langserver

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTCPServer added in v0.5.0

func RunTCPServer(ctx context.Context, addr string, conf *config.Config) error

RunTCPServer generates a server listening on the provided TCP Address, creating a new language Server instance using plain HTTP for every connection.

Types

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, metadataService promClient.MetadataService, 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 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, conf *config.Config) (context.Context, Server)

ServerFromStream generates a Server from a jsonrpc2.Stream.

func StdioServer

func StdioServer(ctx context.Context, conf *config.Config) (context.Context, Server)

StdioServer generates a Server instance talking to stdio.

func (Server) Run

func (s Server) Run() error

Run starts the language server instance.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL