wsrpc

package
v2.7.1-clf-20231106 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const MaxConsecutiveTransmitFailures = 5

MaxConsecutiveTransmitFailures controls how many consecutive requests are allowed to time out before we reset the connection

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	services.ServiceCtx
	pb.MercuryClient
}

func NewClient

func NewClient(lggr logger.Logger, clientPrivKey csakey.KeyV2, serverPubKey []byte, serverURL string) Client

Consumers of wsrpc package should not usually call NewClient directly, but instead use the Pool

type Conn added in v2.3.0

type Conn interface {
	WaitForReady(ctx context.Context) bool
	GetState() connectivity.State
	Close()
}

type Pool

type Pool interface {
	services.ServiceCtx
	// Checkout gets a wsrpc.Client for the given arguments
	// The same underlying client can be checked out multiple times, the pool
	// handles lifecycle management. The consumer can treat it as if it were
	// its own unique client.
	Checkout(ctx context.Context, clientPrivKey csakey.KeyV2, serverPubKey []byte, serverURL string) (client Client, err error)
}

func NewPool

func NewPool(lggr logger.Logger) Pool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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