synchronization

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConnectionStatusDisconnected is the default state
	ConnectionStatusDisconnected = ConnectionStatus("disconnected")
	// ConnectionStatusConnected is used when the client is successfully connected
	ConnectionStatusConnected = ConnectionStatus("connected")
	// ConnectionStatusError is used when there is an error
	ConnectionStatusError = ConnectionStatus("error")
)
View Source
const (
	ExplorerTextMessage   = websocket.TextMessage
	ExplorerBinaryMessage = websocket.BinaryMessage
)
View Source
const CloseTimeout = 100 * time.Millisecond
View Source
const SendBufferSize = 100

SendBufferSize is the number of messages to keep in the buffer before dropping additional ones

View Source
const SendIngressBufferSize = 100

SendIngressBufferSize is the number of messages to keep in the buffer before dropping additional ones

Variables

View Source
var (
	// ErrReceiveTimeout is returned when no message is received after a
	// specified duration in Receive
	ErrReceiveTimeout = errors.New("timeout waiting for message")
)

Functions

This section is empty.

Types

type ConnectionStatus added in v1.10.16

type ConnectionStatus string

type ExplorerClient added in v1.10.16

type ExplorerClient interface {
	service.Service
	Url() url.URL
	Status() ConnectionStatus
	Send(context.Context, []byte, ...int)
	Receive(context.Context, ...time.Duration) ([]byte, error)
}

ExplorerClient encapsulates all the functionality needed to push run information to explorer.

func NewExplorerClient added in v1.10.16

func NewExplorerClient(url *url.URL, accessKey, secret string, loggingArgs ...bool) ExplorerClient

NewExplorerClient returns a stats pusher using a websocket for delivery.

type NoopExplorerClient added in v1.10.16

type NoopExplorerClient struct{}

func (NoopExplorerClient) Close added in v1.10.16

func (NoopExplorerClient) Close() error

func (NoopExplorerClient) Healthy added in v1.10.16

func (NoopExplorerClient) Healthy() error

func (NoopExplorerClient) Ready added in v1.10.16

func (NoopExplorerClient) Ready() error

func (NoopExplorerClient) Receive added in v1.10.16

func (NoopExplorerClient) Send added in v1.10.16

func (NoopExplorerClient) Send(context.Context, []byte, ...int)

func (NoopExplorerClient) Start added in v1.10.16

func (NoopExplorerClient) Start() error

func (NoopExplorerClient) Status added in v1.10.16

func (NoopExplorerClient) Url added in v1.10.16

func (NoopExplorerClient) Url() url.URL

type NoopTelemetryIngressClient added in v1.10.17

type NoopTelemetryIngressClient struct{}

func (NoopTelemetryIngressClient) Close added in v1.10.17

func (NoopTelemetryIngressClient) Healthy added in v1.10.17

func (NoopTelemetryIngressClient) Ready added in v1.10.17

func (NoopTelemetryIngressClient) Send added in v1.10.17

func (NoopTelemetryIngressClient) Start added in v1.10.17

type TelemPayload added in v1.10.17

type TelemPayload struct {
	Ctx             context.Context
	Telemetry       []byte
	ContractAddress common.Address
}

type TelemetryIngressClient added in v1.10.17

type TelemetryIngressClient interface {
	service.Service
	Start() error
	Close() error
	Send(TelemPayload)
}

TelemetryIngressClient encapsulates all the functionality needed to send telemetry to the ingress server using wsrpc

func NewTelemetryIngressClient added in v1.10.17

func NewTelemetryIngressClient(url *url.URL, serverPubKeyHex string, ks keystore.CSA, logging bool) TelemetryIngressClient

NewTelemetryIngressClient returns a client backed by wsrpc that can send telemetry to the telemetry ingress server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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