Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONLogStream ¶
JSONLogStream returns a stream that does log all communications in a format that can be streamed into the lsp inspector
func RunTCPServers ¶
TCPServer generates a Server listening on the provided TCP Address, creating a new language Server instance for every connection
func WebSocketHandler ¶
Types ¶
type Config ¶
type Config struct {
RPCTrace string `yaml:"rpc_trace"`
PrometheusURL string `yaml:"prometheus_url"`
}
Config contains the configuration for a server
func ParseConfig ¶
ParseConfig parses a yaml configuration.
It expects the content of the configuration file as its argument
func ParseConfigFile ¶
ParseConfigFile parses a yaml configuration file.
It expects the path to a configuration file as its argument
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps language server instance that can connect to exactly one client
func ServerFromStream ¶
func ServerFromStream(ctx context.Context, stream jsonrpc2.Stream, config *Config) (context.Context, Server)
ServerFromStream generates a Server from a jsonrpc2.Stream
func StdioServer ¶
StdioServer generates a Server talking to stdio