gotools/gopls/internal/debug/serve.go

type contextKeyType

const instanceKey

const traceKey

type Instance

type State

func (st *State) Bugs() []bug.Bug {}

// Caches returns the set of Cache objects currently being served.
func (st *State) Caches() []*cache.Cache {}

// Cache returns the Cache that matches the supplied id.
func (st *State) Cache(id string) *cache.Cache {}

// Analysis returns the global Analysis template value.
func (st *State) Analysis() (_ analysisTmpl) {}

type analysisTmpl

func (analysisTmpl) AnalyzerRunTimes() []cache.LabelDuration {}

// Sessions returns the set of Session objects currently being served.
func (st *State) Sessions() []*cache.Session {}

// Session returns the Session that matches the supplied id.
func (st *State) Session(id string) *cache.Session {}

// Views returns the set of View objects currently being served.
func (st *State) Views() []*cache.View {}

// View returns the View that matches the supplied id.
func (st *State) View(id string) *cache.View {}

// Clients returns the set of Clients currently being served.
func (st *State) Clients() []*Client {}

// Client returns the Client matching the supplied id.
func (st *State) Client(id string) *Client {}

// Servers returns the set of Servers the instance is currently connected to.
func (st *State) Servers() []*Server {}

type Client

type Server

// addClient adds a client to the set being served.
func (st *State) addClient(session *cache.Session) {}

// dropClient removes a client from the set being served.
func (st *State) dropClient(session *cache.Session) {}

// updateServer updates a server to the set being queried. In practice, there should
// be at most one remote server.
func (st *State) updateServer(server *Server) {}

// dropServer drops a server from the set being queried.
func (st *State) dropServer(id string) {}

type filterResponse

func (c filterResponse) Header() http.Header {}

func (c filterResponse) Write(buf []byte) (int, error) {}

func (c filterResponse) WriteHeader(n int) {}

// replace annoying nuls by spaces
func cmdline(w http.ResponseWriter, r *http.Request) {}

func (i *Instance) getCache(r *http.Request) interface{}

func (i *Instance) getAnalysis(r *http.Request) interface{}

func (i *Instance) getSession(r *http.Request) interface{}

func (i *Instance) getClient(r *http.Request) interface{}

func (i *Instance) getServer(r *http.Request) interface{}

func (i *Instance) getFile(r *http.Request) interface{}

func (i *Instance) getInfo(r *http.Request) interface{}

func (i *Instance) AddService(s protocol.Server, session *cache.Session) {}

func getMemory(_ *http.Request) interface{}

func init() {}

func GetInstance(ctx context.Context) *Instance {}

// WithInstance creates debug instance ready for use using the supplied
// configuration and stores it in the returned context.
func WithInstance(ctx context.Context, agent string) context.Context {}

// SetLogFile sets the logfile for use with this instance.
func (i *Instance) SetLogFile(logfile string, isDaemon bool) (func(), error) {}

// Serve starts and runs a debug server in the background on the given addr.
// It also logs the port the server starts on, to allow for :0 auto assigned
// ports.
func (i *Instance) Serve(ctx context.Context, addr string) (string, error) {}

func (i *Instance) DebugAddress() string {}

func (i *Instance) ListenedDebugAddress() string {}

func makeGlobalExporter(stderr io.Writer) event.Exporter {}

func messageType(l log.Level) protocol.MessageType {}

func makeInstanceExporter(i *Instance) event.Exporter {}

type dataFunc

func render(tmpl *template.Template, fun dataFunc) func(http.ResponseWriter, *http.Request) {}

func commas(s string) string {}

func fuint64(v uint64) string {}

func fuint32(v uint32) string {}

func fcontent(v []byte) string {}

var BaseTemplate

var MainTmpl

var InfoTmpl

var MemoryTmpl

var DebugTmpl

var CacheTmpl

var AnalysisTmpl

var ClientTmpl

var ServerTmpl

var SessionTmpl

var FileTmpl