http

package
v0.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestResponseIDMismatch = errors.New("http request / response ID mismatch")
	ErrInvalidBatchResponse      = errors.New("invalid http batch response size")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an HTTP client implementation

func NewClient

func NewClient(rpcURL string) (*Client, error)

NewClient initializes and creates a new HTTP RPC client

func (*Client) Close

func (c *Client) Close() error

Close has no effect on an HTTP client

func (*Client) SendBatch

func (c *Client) SendBatch(ctx context.Context, requests types.RPCRequests) (types.RPCResponses, error)

SendBatch sends a single RPC batch request to the server

func (*Client) SendRequest

func (c *Client) SendRequest(ctx context.Context, request types.RPCRequest) (*types.RPCResponse, error)

SendRequest sends a single RPC request to the server

Jump to

Keyboard shortcuts

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