Documentation
¶
Overview ¶
Package lsp is the stdio language server behind `wtctl lsp` (LSP 3.17): production latency and error lenses and hovers on functions. It sends only file paths and function names to the API, never source text.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client calls the Watchtower API. It sends only the service, file path and function names.
type Config ¶
type Config struct {
Service string `yaml:"service"`
PathPrefixes []string `yaml:"path_prefixes"`
Project string `yaml:"project"`
}
Config is watchtower.yaml in the repository root.
func LoadConfig ¶
LoadConfig reads root/watchtower.yaml. A missing file is not an error: nothing maps.
type Server ¶
type Server struct {
API *Client
WebURL string // base of issue and trace links; defaults to the API URL
// contains filtered or unexported fields
}
Server is one LSP session.
type Stat ¶
type Stat struct {
Function string `json:"function"`
Count uint64 `json:"count"`
Errors uint64 `json:"errors"`
P50Ms float64 `json:"p50_ms"`
P95Ms float64 `json:"p95_ms"`
LastIssue *struct {
ID string `json:"id"`
Title string `json:"title"`
} `json:"last_issue"`
TraceExample string `json:"trace_example"`
}
Stat mirrors one entry of GET /v1/projects/{p}/code-stats.