types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const MetadataFieldName = "INTERNAL_METADATA"

Variables

View Source
var File_capabilities_consensus_ocr3_types_ocr3_types_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AggregationOutcome

type AggregationOutcome struct {
	EncodableOutcome *pb.Map `protobuf:"bytes,1,opt,name=encodableOutcome,proto3" json:"encodableOutcome,omitempty"` // passed to encoders
	Metadata         []byte  `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`                 // internal to the aggregator
	ShouldReport     bool    `protobuf:"varint,3,opt,name=shouldReport,proto3" json:"shouldReport,omitempty"`
	LastSeenAt       uint64  `protobuf:"varint,4,opt,name=lastSeenAt,proto3" json:"lastSeenAt,omitempty"` // this is the equivalent of a SeqNr
	// contains filtered or unexported fields
}

per-workflow aggregation outcome

func AppendMetadata

func AppendMetadata(outcome *AggregationOutcome, meta *Metadata) (*AggregationOutcome, error)

func (*AggregationOutcome) Descriptor deprecated

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

Deprecated: Use AggregationOutcome.ProtoReflect.Descriptor instead.

func (*AggregationOutcome) GetEncodableOutcome

func (x *AggregationOutcome) GetEncodableOutcome() *pb.Map

func (*AggregationOutcome) GetLastSeenAt

func (x *AggregationOutcome) GetLastSeenAt() uint64

func (*AggregationOutcome) GetMetadata

func (x *AggregationOutcome) GetMetadata() []byte

func (*AggregationOutcome) GetShouldReport

func (x *AggregationOutcome) GetShouldReport() bool

func (*AggregationOutcome) ProtoMessage

func (*AggregationOutcome) ProtoMessage()

func (*AggregationOutcome) ProtoReflect

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

func (*AggregationOutcome) Reset

func (x *AggregationOutcome) Reset()

func (*AggregationOutcome) String

func (x *AggregationOutcome) String() string

type Aggregator

type Aggregator interface {
	// Called by the Outcome() phase of OCR reporting.
	// The inner array of observations corresponds to elements listed in "inputs.observations" section.
	Aggregate(previousOutcome *AggregationOutcome, observations map[ocrcommon.OracleID][]values.Value, f int) (*AggregationOutcome, error)
}

type AggregatorFactory

type AggregatorFactory func(name string, config values.Map, lggr logger.Logger) (Aggregator, error)

type Encoder

type Encoder interface {
	Encode(ctx context.Context, input values.Map) ([]byte, error)
}

type EncoderFactory

type EncoderFactory func(config *values.Map) (Encoder, error)

type Id

type Id struct {
	WorkflowExecutionId      string `protobuf:"bytes,1,opt,name=workflowExecutionId,proto3" json:"workflowExecutionId,omitempty"`
	WorkflowId               string `protobuf:"bytes,2,opt,name=workflowId,proto3" json:"workflowId,omitempty"`
	WorkflowOwner            string `protobuf:"bytes,3,opt,name=workflowOwner,proto3" json:"workflowOwner,omitempty"`
	WorkflowName             string `protobuf:"bytes,4,opt,name=workflowName,proto3" json:"workflowName,omitempty"`
	ReportId                 string `protobuf:"bytes,6,opt,name=reportId,proto3" json:"reportId,omitempty"`
	WorkflowDonId            uint32 `protobuf:"varint,7,opt,name=workflowDonId,proto3" json:"workflowDonId,omitempty"`
	WorkflowDonConfigVersion uint32 `protobuf:"varint,8,opt,name=workflowDonConfigVersion,proto3" json:"workflowDonConfigVersion,omitempty"`
	// contains filtered or unexported fields
}

func (*Id) Descriptor deprecated

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

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetReportId

func (x *Id) GetReportId() string

func (*Id) GetWorkflowDonConfigVersion

func (x *Id) GetWorkflowDonConfigVersion() uint32

func (*Id) GetWorkflowDonId

func (x *Id) GetWorkflowDonId() uint32

func (*Id) GetWorkflowExecutionId

func (x *Id) GetWorkflowExecutionId() string

func (*Id) GetWorkflowId

func (x *Id) GetWorkflowId() string

func (*Id) GetWorkflowName

func (x *Id) GetWorkflowName() string

func (*Id) GetWorkflowOwner

func (x *Id) GetWorkflowOwner() string

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) ProtoReflect

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

func (*Id) Reset

func (x *Id) Reset()

func (*Id) String

func (x *Id) String() string

type Metadata

type Metadata struct {
	Version          uint32 //  1 byte
	ExecutionID      string // 32 hex bytes
	Timestamp        uint32 //  4 bytes
	DONID            uint32 //  4 bytes
	DONConfigVersion uint32 //  4 bytes
	WorkflowID       string // 32 hex bytes
	WorkflowName     string // 10 hex bytes
	WorkflowOwner    string // 20 hex bytes
	ReportID         string //  2 hex bytes
}

type Observation

type Observation struct {
	Id *Id `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// list of observations defined in inputs.observations
	Observations *pb.List `protobuf:"bytes,4,opt,name=observations,proto3" json:"observations,omitempty"`
	// contains filtered or unexported fields
}

func (*Observation) Descriptor deprecated

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

Deprecated: Use Observation.ProtoReflect.Descriptor instead.

func (*Observation) GetId

func (x *Observation) GetId() *Id

func (*Observation) GetObservations

func (x *Observation) GetObservations() *pb.List

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 Observations

type Observations struct {

	// batched observations for multiple workflow execution IDs
	Observations []*Observation `protobuf:"bytes,1,rep,name=observations,proto3" json:"observations,omitempty"`
	// the workflow IDs that are registered in the node
	RegisteredWorkflowIds []string `protobuf:"bytes,2,rep,name=registeredWorkflowIds,proto3" json:"registeredWorkflowIds,omitempty"`
	// contains filtered or unexported fields
}

func (*Observations) Descriptor deprecated

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

Deprecated: Use Observations.ProtoReflect.Descriptor instead.

func (*Observations) GetObservations

func (x *Observations) GetObservations() []*Observation

func (*Observations) GetRegisteredWorkflowIds

func (x *Observations) GetRegisteredWorkflowIds() []string

func (*Observations) ProtoMessage

func (*Observations) ProtoMessage()

func (*Observations) ProtoReflect

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

func (*Observations) Reset

func (x *Observations) Reset()

func (*Observations) String

func (x *Observations) String() string

type Outcome

type Outcome struct {
	Outcomes       map[string]*AggregationOutcome `` /* 157-byte string literal not displayed */
	CurrentReports []*Report                      `protobuf:"bytes,2,rep,name=current_reports,json=currentReports,proto3" json:"current_reports,omitempty"`
	// contains filtered or unexported fields
}

func (*Outcome) Descriptor deprecated

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

Deprecated: Use Outcome.ProtoReflect.Descriptor instead.

func (*Outcome) GetCurrentReports

func (x *Outcome) GetCurrentReports() []*Report

func (*Outcome) GetOutcomes

func (x *Outcome) GetOutcomes() map[string]*AggregationOutcome

func (*Outcome) ProtoMessage

func (*Outcome) ProtoMessage()

func (*Outcome) ProtoReflect

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

func (*Outcome) Reset

func (x *Outcome) Reset()

func (*Outcome) String

func (x *Outcome) String() string

type Query

type Query struct {

	// the requests to get consensus on.
	Ids []*Id `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetIds

func (x *Query) GetIds() []*Id

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 Report

type Report struct {
	Id      *Id                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Outcome *AggregationOutcome `protobuf:"bytes,2,opt,name=outcome,proto3" json:"outcome,omitempty"`
	// contains filtered or unexported fields
}

func (*Report) Descriptor deprecated

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

Deprecated: Use Report.ProtoReflect.Descriptor instead.

func (*Report) GetId

func (x *Report) GetId() *Id

func (*Report) GetOutcome

func (x *Report) GetOutcome() *AggregationOutcome

func (*Report) ProtoMessage

func (*Report) ProtoMessage()

func (*Report) ProtoReflect

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

func (*Report) Reset

func (x *Report) Reset()

func (*Report) String

func (x *Report) String() string

type ReportInfo

type ReportInfo struct {
	Id           *Id  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ShouldReport bool `protobuf:"varint,2,opt,name=should_report,json=shouldReport,proto3" json:"should_report,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportInfo) Descriptor deprecated

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

Deprecated: Use ReportInfo.ProtoReflect.Descriptor instead.

func (*ReportInfo) GetId

func (x *ReportInfo) GetId() *Id

func (*ReportInfo) GetShouldReport

func (x *ReportInfo) GetShouldReport() bool

func (*ReportInfo) ProtoMessage

func (*ReportInfo) ProtoMessage()

func (*ReportInfo) ProtoReflect

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

func (*ReportInfo) Reset

func (x *ReportInfo) Reset()

func (*ReportInfo) String

func (x *ReportInfo) String() string

type SignedReport

type SignedReport struct {
	Report []byte
	// Report context is appended to the report before signing by libOCR.
	// It contains config digest + round/epoch/sequence numbers (currently 96 bytes).
	// Has to be appended to the report before validating signatures.
	Context []byte
	// Always exactly F+1 signatures.
	Signatures [][]byte
	// Report ID defined in the workflow spec (2 bytes).
	ID []byte
}

Jump to

Keyboard shortcuts

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