Documentation ¶
Overview ¶
Package debug exports debug information for gopls.
Index ¶
- Constants
- Variables
- func PrintVersionInfo(ctx context.Context, w io.Writer, verbose bool, mode PrintMode)
- func WithInstance(ctx context.Context, workdir, agent string) context.Context
- type Client
- type Instance
- type PrintMode
- type Server
- type State
- func (st *State) Cache(id string) *cache.Cache
- func (st *State) Caches() []*cache.Cache
- func (st *State) Client(id string) *Client
- func (st *State) Clients() []*Client
- func (st *State) Servers() []*Server
- func (st *State) Session(id string) *cache.Session
- func (st *State) Sessions() []*cache.Session
- func (st *State) View(id string) *cache.View
- func (st *State) Views() []*cache.View
Constants ¶
View Source
const ( PlainText = PrintMode(iota) Markdown HTML )
Variables ¶
View Source
var Version = "master"
Version is a manually-updated mechanism for tracking versions.
Functions ¶
func PrintVersionInfo ¶
PrintVersionInfo writes version 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 struct { Session *cache.Session DebugAddress string Logfile string GoplsPath 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.
type Server ¶
type Server struct { ID string DebugAddress string Logfile string GoplsPath string ClientID string }
A Server is an outgoing connection to a remote LSP server.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State holds debugging information related to the server state.
Click to show internal directories.
Click to hide internal directories.