Documentation ¶
Index ¶
- Constants
- Variables
- func New(lggr logger.Logger, poller logpoller.LogPoller, packer LogDataPacker, ...) *logEventProvider
- func NewLogEventsPacker(utilsABI abi.ABI) *logEventsPacker
- type LogDataPacker
- type LogEventProvider
- type LogEventProviderOptions
- type LogEventProviderTest
- type LogTriggerConfig
- type LogTriggerExtension
Constants ¶
View Source
const (
BlockLimitExceeded = "block limit exceeded"
)
Variables ¶
View Source
var (
ErrHeadNotAvailable = fmt.Errorf("head not available")
)
Functions ¶
func New ¶
func New(lggr logger.Logger, poller logpoller.LogPoller, packer LogDataPacker, opts *LogEventProviderOptions) *logEventProvider
func NewLogEventsPacker ¶
Types ¶
type LogDataPacker ¶
type LogEventProvider ¶
type LogEventProvider interface { // Start starts the log event provider. Start(ctx context.Context) error // Close closes the log event provider. Close() error // RegisterFilter registers the filter (if valid) for the given upkeepID. RegisterFilter(upkeepID *big.Int, cfg LogTriggerConfig) error // UnregisterFilter removes the filter for the given upkeepID. UnregisterFilter(upkeepID *big.Int) error // GetLogs returns the logs in the given range. GetLogs(context.Context) ([]ocr2keepers.UpkeepPayload, error) }
type LogEventProviderOptions ¶
type LogEventProviderOptions struct { // LogRetention is the amount of time to retain logs for. LogRetention time.Duration // AllowedLogsPerBlock is the maximum number of logs allowed per block in the buffer. BufferMaxBlockSize int // LogBufferSize is the number of blocks in the buffer. LogBufferSize int // AllowedLogsPerBlock is the maximum number of logs allowed per block & upkeep in the buffer. AllowedLogsPerBlock int // LogBlocksLookback is the number of blocks to look back for logs. LogBlocksLookback int64 // LookbackBuffer is the number of blocks to add as a buffer to the lookback. LookbackBuffer int64 // BlockRateLimit is the rate limit for fetching logs per block. BlockRateLimit rate.Limit // BlockLimitBurst is the burst limit for fetching logs per block. BlockLimitBurst int // ReadInterval is the interval to fetch logs in the background. ReadInterval time.Duration // ReadMaxBatchSize is the max number of items in one read batch / partition. ReadMaxBatchSize 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 LogTriggerConfig ¶
type LogTriggerConfig automation_utils_2_1.LogTriggerConfig
LogTriggerConfig is an alias for log trigger config.
type LogTriggerExtension ¶
Click to show internal directories.
Click to hide internal directories.