Documentation ¶
Overview ¶
Package debug exports debug information for gopls.
Index ¶
- Constants
- Variables
- func PrintVersionInfo(w io.Writer, verbose bool, mode PrintMode)
- func WithInstance(ctx context.Context, workdir, agent string) context.Context
- type Cache
- type Client
- type File
- type Instance
- type PrintMode
- type Server
- type Session
- type State
- func (st *State) AddCache(cache Cache)
- func (st *State) AddClient(client Client)
- func (st *State) AddServer(server Server)
- func (st *State) AddSession(session Session)
- func (st *State) AddView(view View)
- func (st *State) Caches() []Cache
- func (st *State) Clients() []Client
- func (st *State) DropCache(cache Cache)
- func (st *State) DropClient(client Client)
- func (st *State) DropServer(server Server)
- func (st *State) DropSession(session Session)
- func (st *State) DropView(view View)
- func (st *State) Servers() []Server
- func (st *State) Sessions() []Session
- func (st *State) Views() []View
- type View
Constants ¶
const ( PlainText = PrintMode(iota) Markdown HTML )
Variables ¶
var Version = "master"
Version is a manually-updated mechanism for tracking versions.
Functions ¶
func PrintVersionInfo ¶
PrintVersionInfo writes version and environment information to w, using the output format specified by mode. verbose controls whether additional information is written, including section headers.
Types ¶
type Client ¶
type Client interface { ID() string // MODIFIED: SYSL_LSP //Session() Session DebugAddress() string Logfile() string ServerID() string }
A Client is an incoming connection from a remote client.
type Instance ¶
type Instance struct { Logfile string StartTime time.Time ServerAddress string DebugAddress string ListenedDebugAddress string Workdir string OCAgentConfig string LogWriter io.Writer State *State // contains filtered or unexported fields }
An Instance holds all debug information associated with a gopls instance.
func GetInstance ¶
func (*Instance) MonitorMemory ¶
MonitorMemory starts recording memory statistics each second.
func (*Instance) PrintServerInfo ¶
PrintServerInfo writes HTML debug info to w for the Instance.
func (*Instance) Serve ¶
Serve starts and runs a debug server in the background. It also logs the port the server starts on, to allow for :0 auto assigned ports.
func (*Instance) SetLogFile ¶
SetLogFile sets the logfile for use with this instance.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State holds debugging information related to the server state.
func (*State) AddServer ¶
AddServer adds a server to the set being queried. In practice, there should be at most one remote server.
func (*State) AddSession ¶
AddSession adds a session to the set being served.
func (*State) DropClient ¶
DropClient adds a client to the set being served.
func (*State) DropServer ¶
DropServer drops a server to the set being queried.
func (*State) DropSession ¶
DropSession drops a session from the set being served.