# README
jsonrpc2: JSON-RPC 2.0 implementation for Go

Package jsonrpc2 provides a Go implementation of JSON-RPC 2.0.
This package is experimental until further notice.
Known issues
- Batch requests and responses are not yet supported.
# Functions
AsyncHandler wraps a Handler such that each request is handled in its own goroutine.
HandlerWithError implements Handler by calling the func for each request and handling returned errors and results.
LogMessages causes all messages sent and received on conn to be logged using the provided logger.
Meta returns a call option which attaches the given meta object to the JSON-RPC 2.0 request (this is a Sourcegraph extension to JSON RPC 2.0 for carrying metadata).
NewBufferedStream creates a buffered stream from a network connection (or other similar interface).
No description provided by the author
NewConn creates a new JSON-RPC client/server connection using the given ReadWriteCloser (typically a TCP connection or stdio).
OnRecv causes all requests received on conn to invoke f(req, nil) and all responses to invoke f(req, resp),.
OnSend causes all requests sent on conn to invoke f(req, nil) and all responses to invoke f(nil, resp),.
PickID returns a call option which sets the ID on a request.
# Constants
Errors defined in the JSON-RPC spec.
Errors defined in the JSON-RPC spec.
Errors defined in the JSON-RPC spec.
Errors defined in the JSON-RPC spec.
Errors defined in the JSON-RPC spec.
# Variables
ErrClosed indicates that the JSON-RPC connection is closed (or in the process of closing).
# Structs
No description provided by the author
Conn is a JSON-RPC client/server connection.
Error represents a JSON-RPC response error.
HandlerWithErrorConfigurer is a handler created by HandlerWithError.
ID represents a JSON-RPC 2.0 request ID, which may be either a string or number (or null, which is unsupported).
Request represents a JSON-RPC request or notification.
Response represents a JSON-RPC response.
VarintObjectCodec reads/writes JSON-RPC 2.0 objects with a varint header that encodes the byte length.
VSCodeObjectCodec reads/writes JSON-RPC 2.0 objects with Content-Length and Content-Type headers, as specified by https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#base-protocol.
# Interfaces
CallOption is an option that can be provided to (*Conn).Call to configure custom behavior.
Handler handles JSON-RPC requests and notifications.
JSONRPC2 describes an interface for issuing requests that speak the JSON-RPC 2 protocol.
Logger interface implements one method - Printf.
An ObjectCodec specifies how to encoed and decode a JSON-RPC 2.0 object in a stream.
An ObjectStream is a bidirectional stream of JSON-RPC 2.0 objects.
# Type aliases
ConnOpt is the type of function that can be passed to NewConn to customize the Conn before it is created.