jsonrpc2

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 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 added in v0.7.0

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) Notify

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

func (*Server) Start

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

func (*Server) Stop added in v0.7.0

func (server *Server) Stop() error

Jump to

Keyboard shortcuts

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