shim

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package shim contains implementations of internal types in terms of the external types

Package shim contains implementations of internal types in terms of the external types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitCheckReportingPlugin

type LimitCheckReportingPlugin struct {
	Plugin types.ReportingPlugin
	Limits types.ReportingPluginLimits
}

LimitCheckReportingPlugin wraps another ReportingPlugin and checks that its outputs respect limits. We use it to surface violations to authors of ReportingPlugins as early as possible.

It does not check inputs since those are checked by the SerializingEndpoint.

func (LimitCheckReportingPlugin) Close

func (rp LimitCheckReportingPlugin) Close() error

func (LimitCheckReportingPlugin) Observation

func (LimitCheckReportingPlugin) Query

func (LimitCheckReportingPlugin) Report

func (LimitCheckReportingPlugin) ShouldAcceptFinalizedReport

func (rp LimitCheckReportingPlugin) ShouldAcceptFinalizedReport(ctx context.Context, ts types.ReportTimestamp, report types.Report) (bool, error)

func (LimitCheckReportingPlugin) ShouldTransmitAcceptedReport

func (rp LimitCheckReportingPlugin) ShouldTransmitAcceptedReport(ctx context.Context, ts types.ReportTimestamp, report types.Report) (bool, error)

type OCR2SerializingEndpoint

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

func NewOCR2SerializingEndpoint

func NewOCR2SerializingEndpoint(
	chTelemetry chan<- *serialization.TelemetryWrapper,
	configDigest types.ConfigDigest,
	endpoint commontypes.BinaryNetworkEndpoint,
	logger commontypes.Logger,
	reportingPluginLimits types.ReportingPluginLimits,
) *OCR2SerializingEndpoint

func (*OCR2SerializingEndpoint) Broadcast

func (n *OCR2SerializingEndpoint) Broadcast(msg protocol.Message)

func (*OCR2SerializingEndpoint) Close

func (n *OCR2SerializingEndpoint) Close() error

Close closes the SerializingEndpoint. It will also close the underlying endpoint.

func (*OCR2SerializingEndpoint) Receive

func (*OCR2SerializingEndpoint) SendTo

func (*OCR2SerializingEndpoint) Start

func (n *OCR2SerializingEndpoint) Start() error

Start starts the SerializingEndpoint. It will also start the underlying endpoint.

type OCR2TelemetrySender

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

func MakeOCR2TelemetrySender

func MakeOCR2TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger) OCR2TelemetrySender

func (OCR2TelemetrySender) RoundStarted

func (ts OCR2TelemetrySender) RoundStarted(
	configDigest types.ConfigDigest,
	epoch uint32,
	round uint8,
	leader commontypes.OracleID,
)

type OCR3SerializingEndpoint

type OCR3SerializingEndpoint[RI any] struct {
	// contains filtered or unexported fields
}

func NewOCR3SerializingEndpoint

func NewOCR3SerializingEndpoint[RI any](
	chTelemetry chan<- *serialization.TelemetryWrapper,
	configDigest types.ConfigDigest,
	endpoint commontypes.BinaryNetworkEndpoint,
	logger commontypes.Logger,
) *OCR3SerializingEndpoint[RI]

func (*OCR3SerializingEndpoint[RI]) Broadcast

func (n *OCR3SerializingEndpoint[RI]) Broadcast(msg protocol.Message[RI])

func (*OCR3SerializingEndpoint[RI]) Close

func (n *OCR3SerializingEndpoint[RI]) Close() error

Close closes the SerializingEndpoint. It will also close the underlying endpoint.

func (*OCR3SerializingEndpoint[RI]) Receive

func (n *OCR3SerializingEndpoint[RI]) Receive() <-chan protocol.MessageWithSender[RI]

func (*OCR3SerializingEndpoint[RI]) SendTo

func (n *OCR3SerializingEndpoint[RI]) SendTo(msg protocol.Message[RI], to commontypes.OracleID)

func (*OCR3SerializingEndpoint[RI]) Start

func (n *OCR3SerializingEndpoint[RI]) Start() error

Start starts the SerializingEndpoint. It will also start the underlying endpoint.

type OCR3TelemetrySender

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

func MakeOCR3TelemetrySender

func MakeOCR3TelemetrySender(chTelemetry chan<- *serialization.TelemetryWrapper, logger commontypes.Logger) OCR3TelemetrySender

func (OCR3TelemetrySender) RoundStarted

func (ts OCR3TelemetrySender) RoundStarted(
	configDigest types.ConfigDigest,
	epoch uint64,
	round uint8,
	leader commontypes.OracleID,
)

type SerializingOCR3Database

type SerializingOCR3Database struct {
	BinaryDb ocr3types.Database
}

func (*SerializingOCR3Database) ReadCert

func (*SerializingOCR3Database) ReadConfig

func (*SerializingOCR3Database) WriteCert

Writing with an empty value is the same as deleting.

func (*SerializingOCR3Database) WriteConfig

func (db *SerializingOCR3Database) WriteConfig(ctx context.Context, config types.ContractConfig) error

Jump to

Keyboard shortcuts

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