Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch interface {
// AddRequest adds a single request to the RPC batch
AddRequest(types.RPCRequest)
// Send sends the batch to the RPC layer
Send(context.Context) (types.RPCResponses, error)
// Clear clears out the batch
Clear() int
// Count returns the number of enqueued requests
Count() int
}
Batch is the JSON-RPC batch abstraction
type Client ¶
type Client interface {
// SendRequest sends a single RPC request to the JSON-RPC layer
SendRequest(context.Context, types.RPCRequest) (*types.RPCResponse, error)
// SendBatch sends a batch of RPC requests to the JSON-RPC layer
SendBatch(context.Context, types.RPCRequests) (types.RPCResponses, error)
// Close closes the RPC client
Close() error
}
Client is the JSON-RPC client abstraction
Click to show internal directories.
Click to hide internal directories.