Documentation ¶
Index ¶
- Variables
- func New(lggr logger.Logger, poller logpoller.LogPoller, c client.Client, ...) (LogEventProvider, LogRecoverer)
- func NewLogEventsPacker() *logEventsPacker
- func NewLogProvider(lggr logger.Logger, poller logpoller.LogPoller, packer LogDataPacker, ...) *logEventProvider
- func NewLogRecoverer(lggr logger.Logger, poller logpoller.LogPoller, client client.Client, ...) *logRecoverer
- func NewUpkeepFilterStore() *upkeepFilterStore
- type FilterOptions
- type LogDataPacker
- type LogEventProvider
- type LogEventProviderTest
- type LogRecoverer
- type LogTriggerConfig
- type LogTriggersLifeCycle
- type LogTriggersOptions
- type UpkeepFilterStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogProviderServiceName = "LogEventProvider" ErrHeadNotAvailable = fmt.Errorf("head not available") ErrBlockLimitExceeded = fmt.Errorf("block limit exceeded") // AllowedLogsPerUpkeep is the maximum number of logs allowed per upkeep every single call. AllowedLogsPerUpkeep = 5 // MaxPayloads is the maximum number of payloads to return per call. MaxPayloads = 100 )
View Source
var ( // LogRetention is the amount of time to retain logs for. LogRetention = 24 * time.Hour // LogBackfillBuffer is the number of blocks from the latest block for which backfill is done when adding a filter in log poller LogBackfillBuffer = 100 )
View Source
var ( LogRecovererServiceName = "LogRecoverer" // RecoveryInterval is the interval at which the recovery scanning processing is triggered RecoveryInterval = 5 * time.Second // RecoveryCacheTTL is the time to live for the recovery cache RecoveryCacheTTL = 10 * time.Minute // GCInterval is the interval at which the recovery cache is cleaned up GCInterval = RecoveryCacheTTL - time.Second // MaxProposals is the maximum number of proposals that can be returned by GetRecoveryProposals MaxProposals = 20 )
Functions ¶
func New ¶
func New(lggr logger.Logger, poller logpoller.LogPoller, c client.Client, stateStore core.UpkeepStateReader, finalityDepth uint32) (LogEventProvider, LogRecoverer)
New creates a new log event provider and recoverer. using default values for the options.
func NewLogEventsPacker ¶
func NewLogEventsPacker() *logEventsPacker
func NewLogProvider ¶ added in v2.5.0
func NewLogProvider(lggr logger.Logger, poller logpoller.LogPoller, packer LogDataPacker, filterStore UpkeepFilterStore, opts LogTriggersOptions) *logEventProvider
func NewLogRecoverer ¶ added in v2.5.0
func NewLogRecoverer(lggr logger.Logger, poller logpoller.LogPoller, client client.Client, stateStore core.UpkeepStateReader, packer LogDataPacker, filterStore UpkeepFilterStore, opts LogTriggersOptions) *logRecoverer
func NewUpkeepFilterStore ¶ added in v2.5.0
func NewUpkeepFilterStore() *upkeepFilterStore
Types ¶
type FilterOptions ¶ added in v2.5.0
type FilterOptions struct { UpkeepID *big.Int TriggerConfig LogTriggerConfig UpdateBlock uint64 }
type LogDataPacker ¶
type LogEventProvider ¶
type LogEventProvider interface { ocr2keepers.LogEventProvider LogTriggersLifeCycle RefreshActiveUpkeeps(ids ...*big.Int) ([]*big.Int, error) Start(context.Context) error io.Closer }
type LogEventProviderTest ¶
type LogRecoverer ¶ added in v2.5.0
type LogRecoverer interface { ocr2keepers.RecoverableProvider GetProposalData(context.Context, ocr2keepers.CoordinatedBlockProposal) ([]byte, error) Start(context.Context) error io.Closer }
type LogTriggerConfig ¶
type LogTriggerConfig automation_utils_2_1.LogTriggerConfig
LogTriggerConfig is an alias for log trigger config.
type LogTriggersLifeCycle ¶ added in v2.5.0
type LogTriggersOptions ¶ added in v2.6.0
type LogTriggersOptions struct { // LookbackBlocks is the number of blocks the provider will look back for logs. // The recoverer will scan for logs up to this depth. // NOTE: MUST be set to a greater-or-equal to the chain's finality depth. LookbackBlocks int64 // ReadInterval is the interval to fetch logs in the background. ReadInterval time.Duration // BlockRateLimit is the rate limit on the range of blocks the we fetch logs for. BlockRateLimit rate.Limit // blockLimitBurst is the burst upper limit on the range of blocks the we fetch logs for. BlockLimitBurst int // Finality depth is the number of blocks to wait before considering a block final. FinalityDepth int64 }
LogTriggersOptions holds the options for the log trigger components.
func NewOptions ¶ added in v2.6.0
func NewOptions(finalityDepth int64) LogTriggersOptions
func (*LogTriggersOptions) Defaults ¶ added in v2.6.0
func (o *LogTriggersOptions) Defaults(finalityDepth int64)
Defaults sets the default values for the options. NOTE: o.LookbackBlocks should be set only from within tests
type UpkeepFilterStore ¶ added in v2.5.0
type UpkeepFilterStore interface { GetIDs(selector func(upkeepFilter) bool) []*big.Int UpdateFilters(updater func(upkeepFilter, upkeepFilter) upkeepFilter, filters ...upkeepFilter) Has(id *big.Int) bool Get(id *big.Int) *upkeepFilter RangeFiltersByIDs(iterator func(int, upkeepFilter), ids ...*big.Int) GetFilters(selector func(upkeepFilter) bool) []upkeepFilter AddActiveUpkeeps(filters ...upkeepFilter) RemoveActiveUpkeeps(filters ...upkeepFilter) Size() int }
Click to show internal directories.
Click to hide internal directories.