Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { RPCTrace string `yaml:"rpc_trace"` LogFormat LogFormat `yaml:"log_format"` PrometheusURL string `yaml:"prometheus_url"` RESTAPIPort uint64 `yaml:"rest_api_port"` }
Config contains the configuration for a server.
func ReadConfig ¶ added in v0.5.0
ReadConfig gets the GlobalConfig from a configFile (that is a path to the file).
func (*Config) UnmarshalYAML ¶ added in v0.5.0
UnmarshalYAML overrides a function used internally by the yaml.v3 lib.
type HeadlessServer ¶ added in v0.5.0
type HeadlessServer interface { protocol.Server GetDiagnostics(uri protocol.DocumentURI) (*protocol.PublishDiagnosticsParams, error) }
HeadlessServer is a modified Server interface that is used by the REST API.
func CreateHeadlessServer ¶ added in v0.5.0
func CreateHeadlessServer(ctx context.Context, prometheusClient promClient.Client, logger log.Logger) (HeadlessServer, error)
CreateHeadlessServer creates a locked down server instance for the REST API.
"locked down" in this case means, that the instance cannot send or receive any JSONRPC communication. Logging messages that the instance tries to send over JSONRPC are redirected to stderr.
type LogFormat ¶ added in v0.5.0
type LogFormat string
LogFormat is the type used for describing the format of logs.
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 instance talking to stdio.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package cache is the component of the PromQL language server that is responsible for the caching the content and parse results of documents opened in the language client.
|
Package cache is the component of the PromQL language server that is responsible for the caching the content and parse results of documents opened in the language client. |
documentation
|
|