Documentation ¶
Index ¶
- Variables
- func New(lggr logger.Logger, poller logpoller.LogPoller, c client.Client, ...) (LogEventProvider, LogRecoverer)
- func NewLogEventsPacker(utilsABI abi.ABI) *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 LogEventProviderOptions
- type LogEventProviderTest
- type LogRecoverer
- type LogTriggerConfig
- type LogTriggersLifeCycle
- type UpkeepFilterStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AllowedLogsPerBlock is the maximum number of logs allowed per upkeep in a block. AllowedLogsPerBlock = 128 // BufferMaxBlockSize is the maximum number of blocks in the buffer. BufferMaxBlockSize = 1024 )
View Source
var ( 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 )
View Source
var ( ErrNotFound = errors.New("not found") DefaultRecoveryInterval = 5 * time.Second // TODO: Reduce these intervals to allow sending same proposals again if they were not fulfilled RecoveryCacheTTL = 24*time.Hour - time.Second GCInterval = time.Hour )
View Source
var ( // LogRetention is the amount of time to retain logs for. LogRetention = 24 * time.Hour )
Functions ¶
func New ¶
func New(lggr logger.Logger, poller logpoller.LogPoller, c client.Client, utilsABI abi.ABI, stateStore core.UpkeepStateReader) (LogEventProvider, LogRecoverer)
func NewLogEventsPacker ¶
func NewLogProvider ¶ added in v2.5.0
func NewLogProvider(lggr logger.Logger, poller logpoller.LogPoller, packer LogDataPacker, filterStore UpkeepFilterStore, opts *LogEventProviderOptions) *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, interval time.Duration, lookbackBlocks int64) *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 LogEventProviderOptions ¶
type LogEventProviderOptions struct { // LookbackBlocks is the number of blocks to look back for logs. LookbackBlocks int64 // ReorgBuffer is the number of blocks to add as a buffer to the lookback. ReorgBuffer int64 // 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 // ReadInterval is the interval to fetch logs in the background. ReadInterval time.Duration // ReadBatchSize is the max number of items in one read batch / partition. ReadBatchSize int // Readers is the number of reader workers to spawn. Readers int }
LogEventProviderOptions holds the options for the log event provider.
func (*LogEventProviderOptions) Defaults ¶
func (o *LogEventProviderOptions) Defaults()
Defaults sets the default values for the options.
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 LogTriggersLifeCycle interface { // RegisterFilter registers the filter (if valid) for the given upkeepID. RegisterFilter(opts FilterOptions) error // UnregisterFilter removes the filter for the given upkeepID. UnregisterFilter(upkeepID *big.Int) error }
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.