functions

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_core_services_ocr2_plugins_functions_types_proto protoreflect.FileDescriptor

Functions

func CanAggregate

func CanAggregate(N int, F int, observations []*ProcessedRequest) bool

func NewFunctionsServices added in v2.1.0

func NewFunctionsServices(sharedOracleArgs *libocr2.OracleArgs, conf *FunctionsServicesConfig) ([]job.ServiceCtx, error)

Create all OCR2 plugin Oracles and all extra services needed to run a Functions job.

Types

type FunctionsReportingPluginFactory added in v2.1.0

type FunctionsReportingPluginFactory struct {
	Logger    commontypes.Logger
	PluginORM functions.ORM
	JobID     uuid.UUID
}

func (FunctionsReportingPluginFactory) NewReportingPlugin added in v2.1.0

NewReportingPlugin complies with ReportingPluginFactory

type FunctionsServicesConfig added in v2.1.0

type FunctionsServicesConfig struct {
	Job            job.Job
	PipelineRunner pipeline.Runner
	JobORM         job.ORM
	OCR2JobConfig  validate.Config
	DB             *sqlx.DB
	Chain          evm.Chain
	ContractID     string
	Lggr           logger.Logger
	MailMon        *utils.MailboxMonitor
}

type Observation

type Observation struct {
	ProcessedRequests []*ProcessedRequest `protobuf:"bytes,1,rep,name=processedRequests,proto3" json:"processedRequests,omitempty"`
	// contains filtered or unexported fields
}

func (*Observation) Descriptor deprecated

func (*Observation) Descriptor() ([]byte, []int)

Deprecated: Use Observation.ProtoReflect.Descriptor instead.

func (*Observation) GetProcessedRequests

func (x *Observation) GetProcessedRequests() []*ProcessedRequest

func (*Observation) ProtoMessage

func (*Observation) ProtoMessage()

func (*Observation) ProtoReflect

func (x *Observation) ProtoReflect() protoreflect.Message

func (*Observation) Reset

func (x *Observation) Reset()

func (*Observation) String

func (x *Observation) String() string

type ProcessedRequest

type ProcessedRequest struct {
	RequestID []byte `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"`
	Result    []byte `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	Error     []byte `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func Aggregate

func Aggregate(aggMethod config.AggregationMethod, observations []*ProcessedRequest) (*ProcessedRequest, error)

func (*ProcessedRequest) Descriptor deprecated

func (*ProcessedRequest) Descriptor() ([]byte, []int)

Deprecated: Use ProcessedRequest.ProtoReflect.Descriptor instead.

func (*ProcessedRequest) GetError

func (x *ProcessedRequest) GetError() []byte

func (*ProcessedRequest) GetRequestID

func (x *ProcessedRequest) GetRequestID() []byte

func (*ProcessedRequest) GetResult

func (x *ProcessedRequest) GetResult() []byte

func (*ProcessedRequest) ProtoMessage

func (*ProcessedRequest) ProtoMessage()

func (*ProcessedRequest) ProtoReflect

func (x *ProcessedRequest) ProtoReflect() protoreflect.Message

func (*ProcessedRequest) Reset

func (x *ProcessedRequest) Reset()

func (*ProcessedRequest) String

func (x *ProcessedRequest) String() string

type Query

type Query struct {
	RequestIDs [][]byte `protobuf:"bytes,1,rep,name=requestIDs,proto3" json:"requestIDs,omitempty"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

func (*Query) Descriptor() ([]byte, []int)

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetRequestIDs

func (x *Query) GetRequestIDs() [][]byte

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

func (x *Query) ProtoReflect() protoreflect.Message

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type ReportCodec

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

func NewReportCodec

func NewReportCodec() (*ReportCodec, error)

func (*ReportCodec) DecodeReport

func (c *ReportCodec) DecodeReport(raw []byte) ([]*ProcessedRequest, error)

func (*ReportCodec) EncodeReport

func (c *ReportCodec) EncodeReport(requests []*ProcessedRequest) ([]byte, error)

Directories

Path Synopsis
integration_tests

Jump to

Keyboard shortcuts

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