core

package
v0.1.7-0...-37a9c6b Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorLog

type ErrorLog interface {
	SaveError(ctx context.Context, msg string) error
}

type KeyValueStore

type KeyValueStore interface {
	Store(ctx context.Context, key string, val []byte) error
	Get(ctx context.Context, key string) ([]byte, error)
}

type Keystore

type Keystore interface {
	Accounts(ctx context.Context) (accounts []string, err error)
	// Sign returns data signed by account.
	// nil data can be used as a no-op to check for account existence.
	Sign(ctx context.Context, account string, data []byte) (signed []byte, err error)
}

type MonitoringEndpointGenerator

type MonitoringEndpointGenerator interface {
	GenMonitoringEndpoint(network, chainID, contractID, telemetryType string) commontypes.MonitoringEndpoint
}

type OCR3ReportingPluginClient

type OCR3ReportingPluginClient interface {
	NewReportingPluginFactory(ctx context.Context, config ReportingPluginServiceConfig, grpcProvider grpc.ClientConnInterface, pipelineRunner PipelineRunnerService, telemetry TelemetryService, errorLog ErrorLog, capRegistry CapabilitiesRegistry, keyValueStore KeyValueStore, relayerSet RelayerSet) (OCR3ReportingPluginFactory, error)
	NewValidationService(ctx context.Context) (ValidationService, error)
}

type OCR3ReportingPluginFactory

type OCR3ReportingPluginFactory interface {
	services.Service
	ocr3types.ReportingPluginFactory[[]byte]
}

type OCR3ReportingPluginServer

type OCR3ReportingPluginServer[T types.PluginProvider] interface {
	NewReportingPluginFactory(ctx context.Context, config ReportingPluginServiceConfig, provider T, pipelineRunner PipelineRunnerService, telemetry TelemetryClient, errorLog ErrorLog, capRegistry CapabilitiesRegistry, keyValueStore KeyValueStore, relayerSet RelayerSet) (OCR3ReportingPluginFactory, error)
	NewValidationService(ctx context.Context) (ValidationService, error)
}

type Options

type Options struct {
	MaxTaskDuration time.Duration
}

type PipelineRunnerService

type PipelineRunnerService interface {
	ExecuteRun(ctx context.Context, spec string, vars Vars, options Options) (TaskResults, error)
}

type PluginArgs

type PluginArgs struct {
	TransmitterID string
	PluginConfig  []byte
}

type PluginMedian

type PluginMedian interface {
	// NewMedianFactory returns a new ReportingPluginFactory. If provider implements GRPCClientConn, it can be forwarded efficiently via proxy.
	NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoin, gasPriceSubunits median.DataSource, errorLog ErrorLog) (types.ReportingPluginFactory, error)
}

type RelayArgs

type RelayArgs struct {
	ContractID         string
	RelayConfig        []byte
	ProviderType       string
	MercuryCredentials *types.MercuryCredentials
}

type Relayer

type Relayer interface {
	services.Service
	NewPluginProvider(context.Context, RelayArgs, PluginArgs) (types.PluginProvider, error)
}

type RelayerSet

type RelayerSet interface {
	Get(ctx context.Context, relayID types.RelayID) (Relayer, error)

	// List lists the relayers corresponding to `...types.RelayID`
	// returning all relayers if len(...types.RelayID) == 0.
	List(ctx context.Context, relayIDs ...types.RelayID) (map[types.RelayID]Relayer, error)
}

type ReportingPluginClient

type ReportingPluginClient interface {
	NewReportingPluginFactory(ctx context.Context, config ReportingPluginServiceConfig, grpcProvider grpc.ClientConnInterface, pipelineRunner PipelineRunnerService, telemetry TelemetryService, errorLog ErrorLog, keyValueStore KeyValueStore, relayerSet RelayerSet) (types.ReportingPluginFactory, error)
	NewValidationService(ctx context.Context) (ValidationService, error)
}

ReportingPluginClient is the client interface to a plugin running as a generic job (job type = GenericPlugin) inside the core node.

type ReportingPluginServer

type ReportingPluginServer[T types.PluginProvider] interface {
	NewReportingPluginFactory(ctx context.Context, config ReportingPluginServiceConfig, provider T, pipelineRunner PipelineRunnerService, telemetry TelemetryClient, errorLog ErrorLog, keyValueStore KeyValueStore, relayerSet RelayerSet) (types.ReportingPluginFactory, error)
	NewValidationService(ctx context.Context) (ValidationService, error)
}

ReportingPluginServer is the server interface to a plugin running as a generic job (job type = GenericPlugin) inside the core node, with the passthrough provider connection converted to the provider expected by the plugin.

type ReportingPluginServiceConfig

type ReportingPluginServiceConfig struct {
	ProviderType  string
	Command       string
	PluginName    string
	TelemetryType string
	PluginConfig  string
}

type TaskResult

type TaskResult struct {
	ID    string
	Type  string
	Index int

	TaskValue
}

type TaskResults

type TaskResults []TaskResult

func (TaskResults) FinalResults

func (tr TaskResults) FinalResults() []TaskValue

type TaskValue

type TaskValue struct {
	Error      error
	Value      jsonserializable.JSONSerializable
	IsTerminal bool
}

type TelemetryClient

type TelemetryClient interface {
	TelemetryService
	NewEndpoint(ctx context.Context, nework string, chainID string, contractID string, telemetryType string) (TelemetryClientEndpoint, error)
}

type TelemetryClientEndpoint

type TelemetryClientEndpoint interface {
	SendLog(ctx context.Context, log []byte) error
}

type TelemetryService

type TelemetryService interface {
	Send(ctx context.Context, network string, chainID string, contractID string, telemetryType string, payload []byte) error
}

type ValidationService

type ValidationService interface {
	services.Service
	ValidateConfig(ctx context.Context, config map[string]interface{}) error
}

type ValidationServiceClient

type ValidationServiceClient interface {
	ValidateConfig(ctx context.Context, config map[string]interface{}) error
}

type ValidationServiceServer

type ValidationServiceServer interface {
	ValidateConfig(ctx context.Context, config map[string]interface{}) error
}

type Vars

type Vars struct {
	Vars map[string]interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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