synchronization

package
v2.7.1-beta0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTelemetryIngressBatchWorker

func NewTelemetryIngressBatchWorker(
	telemMaxBatchSize uint,
	telemSendInterval time.Duration,
	telemSendTimeout time.Duration,
	telemClient telemPb.TelemClient,
	wgDone *sync.WaitGroup,
	chDone chan struct{},
	chTelemetry chan TelemPayload,
	contractID string,
	telemType TelemetryType,
	globalLogger logger.Logger,
	logging bool,
) *telemetryIngressBatchWorker

NewTelemetryIngressBatchWorker returns a worker for a given contractID that can send telemetry to the ingress server via WSRPC

Types

type NoopTelemetryIngressBatchClient

type NoopTelemetryIngressBatchClient struct{}

NoopTelemetryIngressBatchClient is a no-op interface for TelemetryIngressBatchClient

func (NoopTelemetryIngressBatchClient) Close

Close is a no-op

func (NoopTelemetryIngressBatchClient) HealthReport

func (NoopTelemetryIngressBatchClient) HealthReport() map[string]error

func (NoopTelemetryIngressBatchClient) Name

func (NoopTelemetryIngressBatchClient) Ready

Ready is a no-op

func (NoopTelemetryIngressBatchClient) Send

Send is a no-op

func (NoopTelemetryIngressBatchClient) Start

Start is a no-op

type NoopTelemetryIngressClient

type NoopTelemetryIngressClient struct{}

func (NoopTelemetryIngressClient) Close

Close is a no-op

func (NoopTelemetryIngressClient) HealthReport

func (NoopTelemetryIngressClient) HealthReport() map[string]error

func (NoopTelemetryIngressClient) Name

func (NoopTelemetryIngressClient) Ready

Ready is a no-op

func (NoopTelemetryIngressClient) Send

Send is a no-op

func (NoopTelemetryIngressClient) Start

Start is a no-op

type TelemPayload

type TelemPayload struct {
	Telemetry  []byte
	TelemType  TelemetryType
	ContractID string
}

type TelemetryService added in v2.7.0

type TelemetryService interface {
	services.ServiceCtx
	Send(ctx context.Context, telemetry []byte, contractID string, telemType TelemetryType)
}

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

func NewTelemetryIngressBatchClient

func NewTelemetryIngressBatchClient(url *url.URL, serverPubKeyHex string, ks keystore.CSA, logging bool, lggr logger.Logger, telemBufferSize uint, telemMaxBatchSize uint, telemSendInterval time.Duration, telemSendTimeout time.Duration, useUniconn bool) TelemetryService

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

func NewTelemetryIngressClient

func NewTelemetryIngressClient(url *url.URL, serverPubKeyHex string, ks keystore.CSA, logging bool, lggr logger.Logger, telemBufferSize uint) TelemetryService

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

type TelemetryType

type TelemetryType string

TelemetryType defines supported telemetry types

const (
	EnhancedEA        TelemetryType = "enhanced-ea"
	FunctionsRequests TelemetryType = "functions-requests"
	EnhancedEAMercury TelemetryType = "enhanced-ea-mercury"
	OCR               TelemetryType = "ocr"
	OCR2Automation    TelemetryType = "ocr2-automation"
	OCR2Functions     TelemetryType = "ocr2-functions"
	OCR2Threshold     TelemetryType = "ocr2-threshold"
	OCR2S4            TelemetryType = "ocr2-s4"
	OCR2Median        TelemetryType = "ocr2-median"
	OCR3Mercury       TelemetryType = "ocr3-mercury"
	OCR2VRF           TelemetryType = "ocr2-vrf"
	AutomationCustom  TelemetryType = "automation-custom"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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