Documentation
¶
Index ¶
- type Client
- func (c *Client) HandleMessage(ctx context.Context, data []byte)
- func (c *Client) LastRequestID() jsonrpc.RequestId
- func (c *Client) NextRequestID() jsonrpc.RequestId
- func (c *Client) Notify(ctx context.Context, request *jsonrpc.Notification) error
- func (c *Client) Send(ctx context.Context, request *jsonrpc.Request) (*jsonrpc.Response, error)
- func (c *Client) SetError(err error)
- type Handler
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Transport
Handler transport.Handler
*transport.RoundTrips
RunTimeout time.Duration
Listener jsonrpc.Listener
Logger jsonrpc.Logger // Logger for error messages
Interceptor transport.Interceptor // Interceptor for request/response
RequestIdSeq uint64
// contains filtered or unexported fields
}
func (*Client) LastRequestID ¶ added in v0.7.3
LastRequestID returns the most recently generated request id without mutating the underlying sequence. It is concurrency-safe and can be used to inspect the current sequence value.
func (*Client) NextRequestID ¶ added in v0.7.1
type Handler ¶
type Handler struct{}
Handler represents a default handler
func (*Handler) OnNotification ¶
func (h *Handler) OnNotification(_ context.Context, _ *jsonrpc.Notification)
Click to show internal directories.
Click to hide internal directories.