Documentation ¶
Overview ¶
Package jsonrpc provides a JSON-RPC 2.0 server implementation for the version of the protocol defined at https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#baseProtocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInvalidRequestError ¶
NewInvalidRequestError returns an error indicating that the provided request is invalid.
func NewMethodNotFoundError ¶
NewMethodNotFoundError returns an error indicating that the requested method was not found.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a JSON-RPC client.
type Handler ¶
type Handler interface { // HandleRequest responds to a JSON-RPC request. HandleRequest(method string, params *json.RawMessage) (any, error) // HandleNotification handles a JSON-RPC notification. HandleNotification(method string, params *json.RawMessage) // SetClient sets the client that the handler can use to send requests and notifications to the server's client. SetClient(*Client) }
Handler handles JSON-RPC requests and notifications.
Click to show internal directories.
Click to hide internal directories.