Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonrpc2

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method func(*json.RawMessage) (any, error)

type ObjectStream

type ObjectStream = jsonrpc2.ObjectStream

type Server

type Server struct {
	Methods map[string]Method
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Call

func (server *Server) Call(method string, params any) error

func (*Server) CallWithResult added in v1.6.0

func (server *Server) CallWithResult(method string, params any, result any) error

CallWithResult performs a JSON-RPC call expecting a result to be decoded into result.

func (*Server) Notify

func (server *Server) Notify(method string, params any) error

func (*Server) Start

func (server *Server) Start(stream ObjectStream) <-chan struct{}

func (*Server) Stop

func (server *Server) Stop() error

Jump to

Keyboard shortcuts

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