Documentation
¶
Index ¶
- Variables
- func CalcPositioningConstant(upkeepID int64, registryAddress ethkey.EIP55Address) (int32, error)
- func ValidatedKeeperSpec(tomlString string) (job.Job, error)
- type Config
- type Delegate
- type MailRoom
- type ORM
- func (korm ORM) BatchDeleteUpkeepsForJob(ctx context.Context, jobID int32, upkeedIDs []int64) (int64, error)
- func (korm ORM) EligibleUpkeepsForRegistry(ctx context.Context, registryAddress ethkey.EIP55Address, ...) ([]UpkeepRegistration, error)
- func (korm ORM) LowestUnsyncedID(ctx context.Context, regID int32) (int64, error)
- func (korm ORM) Registries(ctx context.Context) ([]Registry, error)
- func (korm ORM) RegistryForJob(ctx context.Context, jobID int32) (Registry, error)
- func (korm ORM) SetLastRunHeightForUpkeepOnJob(ctx context.Context, jobID int32, upkeepID, height int64) error
- func (korm ORM) UpsertRegistry(ctx context.Context, registry *Registry) error
- func (korm ORM) UpsertUpkeep(ctx context.Context, registration *UpkeepRegistration) error
- type Registry
- type RegistrySynchronizer
- func (rs *RegistrySynchronizer) Close() error
- func (rs *RegistrySynchronizer) HandleLog(broadcast log.Broadcast)
- func (rs *RegistrySynchronizer) HandleUpkeepRegistered(broadcast log.Broadcast, registry Registry)
- func (rs *RegistrySynchronizer) JobID() int32
- func (rs *RegistrySynchronizer) Start() error
- type UpkeepExecuter
- type UpkeepRegistration
Constants ¶
This section is empty.
Variables ¶
var RegistryABI = eth.MustGetABI(keeper_registry_wrapper.KeeperRegistryABI)
Functions ¶
func CalcPositioningConstant ¶
func CalcPositioningConstant(upkeepID int64, registryAddress ethkey.EIP55Address) (int32, error)
CalcPositioningConstant calculates a positioning constant. The positioning constant is fixed because upkeepID and registryAddress are immutable
Types ¶
type Config ¶
type Config interface {
EvmEIP1559DynamicFees() bool
KeeperDefaultTransactionQueueDepth() uint32
KeeperGasPriceBufferPercent() uint32
KeeperGasTipCapBufferPercent() uint32
KeeperMaximumGracePeriod() int64
KeeperMinimumRequiredConfirmations() uint64
KeeperRegistryCheckGasOverhead() uint64
KeeperRegistryPerformGasOverhead() uint64
KeeperRegistrySyncInterval() time.Duration
KeeperRegistrySyncUpkeepQueueSize() uint32
}
type Delegate ¶
type Delegate struct {
// contains filtered or unexported fields
}
func NewDelegate ¶
func NewDelegate( db *gorm.DB, jrm job.ORM, pr pipeline.Runner, logger logger.Logger, chainSet evm.ChainSet, ) *Delegate
NewDelegate is the constructor of Delegate
func (Delegate) AfterJobCreated ¶
func (Delegate) BeforeJobDeleted ¶
type MailRoom ¶
type MailRoom struct {
// contains filtered or unexported fields
}
MailRoom holds the log mailboxes for all the log types that keeper cares about
type ORM ¶
ORM implements ORM layer using PostgreSQL
func NewORM ¶
func NewORM(db *gorm.DB, txm transmitter, config Config, strategy bulletprooftxmanager.TxStrategy) ORM
NewORM is the constructor of postgresORM
func (ORM) BatchDeleteUpkeepsForJob ¶
func (ORM) EligibleUpkeepsForRegistry ¶
func (korm ORM) EligibleUpkeepsForRegistry( ctx context.Context, registryAddress ethkey.EIP55Address, blockNumber, gracePeriod int64, ) ([]UpkeepRegistration, error)
func (ORM) LowestUnsyncedID ¶
LowestUnsyncedID returns the largest upkeepID + 1, indicating the expected next upkeepID to sync from the contract
func (ORM) Registries ¶
Registries
func (ORM) RegistryForJob ¶
func (ORM) SetLastRunHeightForUpkeepOnJob ¶
func (ORM) UpsertRegistry ¶
func (ORM) UpsertUpkeep ¶
func (korm ORM) UpsertUpkeep(ctx context.Context, registration *UpkeepRegistration) error
type Registry ¶
type Registry struct {
ID int32 `gorm:"primary_key"`
BlockCountPerTurn int32
CheckGas int32
ContractAddress ethkey.EIP55Address
FromAddress ethkey.EIP55Address
JobID int32
KeeperIndex int32
NumKeepers int32
}
type RegistrySynchronizer ¶
type RegistrySynchronizer struct {
utils.StartStopOnce
// contains filtered or unexported fields
}
func NewRegistrySynchronizer ¶
func NewRegistrySynchronizer( job job.Job, contract *keeper_registry_wrapper.KeeperRegistry, orm ORM, jrm job.ORM, logBroadcaster log.Broadcaster, syncInterval time.Duration, minConfirmations uint64, logger logger.Logger, syncUpkeepQueueSize uint32, ) *RegistrySynchronizer
NewRegistrySynchronizer is the constructor of RegistrySynchronizer
func (*RegistrySynchronizer) Close ¶
func (rs *RegistrySynchronizer) Close() error
func (*RegistrySynchronizer) HandleLog ¶
func (rs *RegistrySynchronizer) HandleLog(broadcast log.Broadcast)
func (*RegistrySynchronizer) HandleUpkeepRegistered ¶
func (rs *RegistrySynchronizer) HandleUpkeepRegistered(broadcast log.Broadcast, registry Registry)
func (*RegistrySynchronizer) JobID ¶
func (rs *RegistrySynchronizer) JobID() int32
func (*RegistrySynchronizer) Start ¶
func (rs *RegistrySynchronizer) Start() error
type UpkeepExecuter ¶
type UpkeepExecuter struct {
utils.StartStopOnce
// contains filtered or unexported fields
}
UpkeepExecuter implements the logic to communicate with KeeperRegistry
func NewUpkeepExecuter ¶
func NewUpkeepExecuter( job job.Job, orm ORM, pr pipeline.Runner, ethClient eth.Client, headBroadcaster httypes.HeadBroadcaster, gasEstimator gas.Estimator, logger logger.Logger, config Config, ) *UpkeepExecuter
NewUpkeepExecuter is the constructor of UpkeepExecuter
func (*UpkeepExecuter) Close ¶
func (ex *UpkeepExecuter) Close() error
Close stops and closes upkeep executer
func (*UpkeepExecuter) OnNewLongestChain ¶
func (ex *UpkeepExecuter) OnNewLongestChain(_ context.Context, head eth.Head)
OnNewLongestChain handles the given head of a new longest chain
func (*UpkeepExecuter) Start ¶
func (ex *UpkeepExecuter) Start() error
Start starts the upkeep executer logic