Documentation ¶
Index ¶
- Constants
- Variables
- func NewTelemetryIngressBatchWorker(telemMaxBatchSize uint, telemSendInterval time.Duration, ...) *telemetryIngressBatchWorker
- type ConnectionStatus
- type ExplorerClient
- type NoopExplorerClient
- func (NoopExplorerClient) Close() error
- func (NoopExplorerClient) HealthReport() map[string]error
- func (NoopExplorerClient) Name() string
- func (NoopExplorerClient) Ready() error
- func (NoopExplorerClient) Receive(context.Context, ...time.Duration) ([]byte, error)
- func (NoopExplorerClient) Send(context.Context, []byte, ...int)
- func (NoopExplorerClient) Start(context.Context) error
- func (NoopExplorerClient) Status() ConnectionStatus
- func (NoopExplorerClient) Url() url.URL
- type NoopTelemetryIngressBatchClient
- func (NoopTelemetryIngressBatchClient) Close() error
- func (NoopTelemetryIngressBatchClient) HealthReport() map[string]error
- func (NoopTelemetryIngressBatchClient) Name() string
- func (NoopTelemetryIngressBatchClient) Ready() error
- func (NoopTelemetryIngressBatchClient) Send(TelemPayload)
- func (NoopTelemetryIngressBatchClient) Start(context.Context) error
- type NoopTelemetryIngressClient
- func (NoopTelemetryIngressClient) Close() error
- func (NoopTelemetryIngressClient) HealthReport() map[string]error
- func (NoopTelemetryIngressClient) Name() string
- func (NoopTelemetryIngressClient) Ready() error
- func (NoopTelemetryIngressClient) Send(TelemPayload)
- func (NoopTelemetryIngressClient) Start(context.Context) error
- type TelemPayload
- type TelemetryIngressBatchClient
- type TelemetryIngressClient
- type TelemetryType
Constants ¶
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") )
const ( ExplorerTextMessage = websocket.TextMessage ExplorerBinaryMessage = websocket.BinaryMessage )
const SendBufferSize = 100
SendBufferSize is the number of messages to keep in the buffer before dropping additional ones
Variables ¶
var ( // ErrReceiveTimeout is returned when no message is received after a // specified duration in Receive ErrReceiveTimeout = errors.New("timeout waiting for message") )
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 ConnectionStatus ¶
type ConnectionStatus string
type ExplorerClient ¶
type ExplorerClient interface { services.ServiceCtx 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 ¶
NewExplorerClient returns a stats pusher using a websocket for delivery.
type NoopExplorerClient ¶
type NoopExplorerClient struct{}
func (NoopExplorerClient) HealthReport ¶
func (NoopExplorerClient) HealthReport() map[string]error
func (NoopExplorerClient) Name ¶
func (NoopExplorerClient) Name() string
func (NoopExplorerClient) Send ¶
func (NoopExplorerClient) Send(context.Context, []byte, ...int)
Send is a no-op
func (NoopExplorerClient) Start ¶
func (NoopExplorerClient) Start(context.Context) error
Start is a no-op
func (NoopExplorerClient) Status ¶
func (NoopExplorerClient) Status() ConnectionStatus
Status always returns ConnectionStatusDisconnected.
func (NoopExplorerClient) Url ¶
func (NoopExplorerClient) Url() url.URL
Url always returns underlying url.
type NoopTelemetryIngressBatchClient ¶
type NoopTelemetryIngressBatchClient struct{}
NoopTelemetryIngressBatchClient is a no-op interface for TelemetryIngressBatchClient
func (NoopTelemetryIngressBatchClient) Close ¶
func (NoopTelemetryIngressBatchClient) Close() error
Close is a no-op
func (NoopTelemetryIngressBatchClient) HealthReport ¶
func (NoopTelemetryIngressBatchClient) HealthReport() map[string]error
Healthy is a no-op
func (NoopTelemetryIngressBatchClient) Name ¶
func (NoopTelemetryIngressBatchClient) Name() string
func (NoopTelemetryIngressBatchClient) Ready ¶
func (NoopTelemetryIngressBatchClient) Ready() error
Ready is a no-op
func (NoopTelemetryIngressBatchClient) Send ¶
func (NoopTelemetryIngressBatchClient) Send(TelemPayload)
Send is a no-op
type NoopTelemetryIngressClient ¶
type NoopTelemetryIngressClient struct{}
func (NoopTelemetryIngressClient) Close ¶
func (NoopTelemetryIngressClient) Close() error
Close is a no-op
func (NoopTelemetryIngressClient) HealthReport ¶
func (NoopTelemetryIngressClient) HealthReport() map[string]error
func (NoopTelemetryIngressClient) Name ¶
func (NoopTelemetryIngressClient) Name() string
func (NoopTelemetryIngressClient) Ready ¶
func (NoopTelemetryIngressClient) Ready() error
Ready is a no-op
func (NoopTelemetryIngressClient) Send ¶
func (NoopTelemetryIngressClient) Send(TelemPayload)
Send is a no-op
type TelemPayload ¶
type TelemPayload struct { Ctx context.Context Telemetry []byte TelemType TelemetryType ContractID string }
type TelemetryIngressBatchClient ¶
type TelemetryIngressBatchClient interface { services.ServiceCtx Send(TelemPayload) }
TelemetryIngressBatchClient 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) TelemetryIngressBatchClient
NewTelemetryIngressBatchClient returns a client backed by wsrpc that can send telemetry to the telemetry ingress server
type TelemetryIngressClient ¶
type TelemetryIngressClient interface { services.ServiceCtx Send(TelemPayload) }
TelemetryIngressClient encapsulates all the functionality needed to send telemetry to the ingress server using wsrpc
func NewTelemetryIngressClient ¶
func NewTelemetryIngressClient(url *url.URL, serverPubKeyHex string, ks keystore.CSA, logging bool, lggr logger.Logger, telemBufferSize uint) TelemetryIngressClient
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" OCR TelemetryType = "ocr" OCR2Automation TelemetryType = "ocr2-automation" OCR2Functions TelemetryType = "ocr2-functions" OCR2Median TelemetryType = "ocr2-median" OCR2Mercury TelemetryType = "ocr2-mercury" OCR2VRF TelemetryType = "ocr2-vrf" )