Documentation ¶
Index ¶
- func ServerMaker() (*server.Server, jrpctest.ClientMaker, func())
- type Client
- func (c *Client) BatchCall(ctx context.Context, b ...*codec.BatchElem) error
- 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 codec.Middleware)
- func (c *Client) Notify(ctx context.Context, method string, params any) error
- func (c *Client) SetHeader(key string, value string)
- type Codec
- func (c *Codec) Close() error
- func (c *Codec) Closed() <-chan struct{}
- func (c *Codec) PeerInfo() codec.PeerInfo
- func (c *Codec) ReadBatch(ctx context.Context) ([]*codec.Message, bool, error)
- func (c *Codec) RemoteAddr() string
- func (c *Codec) Send(ctx context.Context, msg json.RawMessage) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerMaker ¶
func ServerMaker() (*server.Server, jrpctest.ClientMaker, func())
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Mount ¶
func (c *Client) Mount(h codec.Middleware)
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.