rpcclient

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0, UNKNOWN not legal advice Imports: 0 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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