Documentation
¶
Index ¶
- Variables
- type Factory
- func (o *Factory) Close() error
- func (o *Factory) HealthReport() map[string]error
- func (o *Factory) Name() string
- func (o *Factory) NewReportingPlugin(_ context.Context, config ocr3types.ReportingPluginConfig) (ocr3types.ReportingPlugin[[]byte], ocr3types.ReportingPluginInfo, error)
- func (o *Factory) Start(ctx context.Context) error
- type Plugin
- func (p *Plugin) Close() error
- func (p *Plugin) Observation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query) (types.Observation, error)
- func (p *Plugin) ObservationQuorum(_ context.Context, _ ocr3types.OutcomeContext, _ types.Query, ...) (quorumReached bool, err error)
- func (p *Plugin) Outcome(ctx context.Context, outctx ocr3types.OutcomeContext, _ types.Query, ...) (ocr3types.Outcome, error)
- func (p *Plugin) Query(_ context.Context, _ ocr3types.OutcomeContext) (types.Query, error)
- func (p *Plugin) Reports(_ context.Context, _ uint64, outcome ocr3types.Outcome) ([]ocr3types.ReportPlus[[]byte], error)
- func (p *Plugin) ShouldAcceptAttestedReport(ctx context.Context, seqNr uint64, ...) (bool, error)
- func (p *Plugin) ShouldTransmitAcceptedReport(ctx context.Context, seqNr uint64, ...) (bool, error)
- func (p *Plugin) ValidateObservation(_ context.Context, oc ocr3types.OutcomeContext, _ types.Query, ...) error
- type Request
- type Response
- type Store
- func (s *Store) GetDonTimeForSeqNum(executionID string, seqNum int) *int64
- func (s *Store) GetDonTimes(executionID string) ([]int64, error)
- func (s *Store) GetLastObservedDonTime() int64
- func (s *Store) GetRequest(executionID string) *Request
- func (s *Store) GetRequests() map[string]*Request
- func (s *Store) RemoveRequest(executionID string)
- func (s *Store) RequestDonTime(executionID string, seqNum int) <-chan Response
- type Transmitter
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRequestTimeout = 10 * time.Minute
This timeout is used to remove the request from the pending queue inside the Store object. Having a short timeout here comes with a risk of affecting all future sequence numbers for the same executionID, if the plugin is not able to process the request fast enough. For that reason, we keep this timeout relatively long but allow the Engine to time out much faster when waiting on the response channel.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
services.StateMachine
// contains filtered or unexported fields
}
func (*Factory) HealthReport ¶
func (*Factory) NewReportingPlugin ¶
func (o *Factory) NewReportingPlugin(_ context.Context, config ocr3types.ReportingPluginConfig) (ocr3types.ReportingPlugin[[]byte], ocr3types.ReportingPluginInfo, error)
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Observation ¶
func (p *Plugin) Observation(ctx context.Context, outctx ocr3types.OutcomeContext, query types.Query) (types.Observation, error)
func (*Plugin) ObservationQuorum ¶
func (*Plugin) ShouldAcceptAttestedReport ¶
func (*Plugin) ShouldTransmitAcceptedReport ¶
func (*Plugin) ValidateObservation ¶
func (p *Plugin) ValidateObservation(_ context.Context, oc ocr3types.OutcomeContext, _ types.Query, ao types.AttributedObservation) error
type Request ¶
type Request struct {
ExpiresAt time.Time
// CallbackCh is a channel to send a response back to the requester
// after the request has been processed or timed out.
CallbackCh chan Response
WorkflowExecutionID string
SeqNum int
// contains filtered or unexported fields
}
func (*Request) SendResponse ¶
func (*Request) SendTimeout ¶
func (r *Request) SendTimeout()
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetDonTimeForSeqNum ¶
func (*Store) GetLastObservedDonTime ¶
func (*Store) GetRequest ¶
func (*Store) GetRequests ¶ added in v0.9.0
func (*Store) RemoveRequest ¶ added in v0.9.0
type Transmitter ¶
type Transmitter struct {
// contains filtered or unexported fields
}
Transmitter is a custom transmitter for the OCR3 capability. When called it will transmit DonTime requests back to the caller and handle deletion of finished executionIDs.
func NewTransmitter ¶
func (*Transmitter) FromAccount ¶
func (*Transmitter) Transmit ¶
func (t *Transmitter) Transmit(_ context.Context, _ types.ConfigDigest, _ uint64, r ocr3types.ReportWithInfo[[]byte], _ []types.AttributedOnchainSignature) error
Click to show internal directories.
Click to hide internal directories.