import "golang.org/x/tools/internal/jsonrpc2/servertest"
Package servertest provides utilities for running tests against a remote LSP server.
Connector is the interface used to connect to a server.
type PipeServer struct {
// contains filtered or unexported fields
}
PipeServer is a test server that handles connections over io.Pipes.
func NewPipeServer(ctx context.Context, server jsonrpc2.StreamServer, framer jsonrpc2.Framer) *PipeServer
NewPipeServer returns a test server that can be connected to via io.Pipes.
Connect creates new io.Pipes and binds them to the underlying StreamServer.
TCPServer is a helper for executing tests against a remote jsonrpc2 connection. Once initialized, its Addr field may be used to connect a jsonrpc2 client.
func NewTCPServer(ctx context.Context, server jsonrpc2.StreamServer, framer jsonrpc2.Framer) *TCPServer
NewTCPServer returns a new test server listening on local tcp port and serving incoming jsonrpc2 streams using the provided stream server. It panics on any error.
Connect dials the test server and returns a jsonrpc2 Connection that is ready for use.
Package servertest imports 6 packages (graph) and is imported by 4 packages. Updated 2021-01-25. Refresh now. Tools for package owners.