Documentation ¶
Index ¶
- func ServerMaker() (jsonrpc.Handler, jrpctest.ClientMaker, func())
- type Client
- func (c *Client) Close() error
- func (c *Client) Closed() <-chan struct{}
- func (c *Client) Do(ctx context.Context, result any, method string, params any) error
- func (c *Client) Mount(h jsonrpc.Middleware)
- func (c *Client) Notify(ctx context.Context, method string, params any) error
- func (c *Client) SetHandlerPeer(pi jsonrpc.PeerInfo)
- func (c *Client) SetHeader(key string, value string)
- type Codec
- func (c *Codec) Close() error
- func (c *Codec) Closed() <-chan struct{}
- func (c *Codec) Flush() error
- func (c *Codec) PeerInfo() jsonrpc.PeerInfo
- func (c *Codec) ReadBatch(ctx context.Context) ([]*jsonrpc.Message, bool, error)
- func (c *Codec) RemoteAddr() string
- func (c *Codec) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerMaker ¶
func ServerMaker() (jsonrpc.Handler, jrpctest.ClientMaker, func())
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Mount ¶
func (c *Client) Mount(h jsonrpc.Middleware)
func (*Client) SetHandlerPeer ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
func (*Codec) Closed ¶
func (c *Codec) Closed() <-chan struct{}
Closed returns a channel which is closed when the connection is closed.
func (*Codec) RemoteAddr ¶
RemoteAddr returns the peer address of the connection.
Click to show internal directories.
Click to hide internal directories.