Versions in this module Expand all Collapse all v0 v0.5.0 Jun 23, 2023 v0.4.0 Jun 22, 2023 v0.3.0 Jun 22, 2023 v0.2.0 Jun 22, 2023 Changes in this version + var ErrInvalidJobType = errors.New("invalid job type") + var ErrInvalidSchemaVersion = errors.New("invalid schema version") + var ErrNoChainFromSpec = fmt.Errorf("could not get chain from spec") + var ErrNoPipelineSpec = errors.New("pipeline spec not specified") + var ErrNoSendingKeysFromSpec = fmt.Errorf("could not get sending keys from spec") + var ErrNoSuchKeyBundle = errors.New("no such key bundle exists") + var ErrNoSuchPublicKey = errors.New("no such public key exists") + var ErrNoSuchTransmitterKey = errors.New("no such transmitter key exists") + func EVMChainForJob(job *Job, set evm.ChainSet) (evm.Chain, error) + func ExternalJobIDEncodeBytesToTopic(id uuid.UUID) common.Hash + func ExternalJobIDEncodeStringToTopic(id uuid.UUID) common.Hash + func LoadAllJobTypes(tx pg.Queryer, job *Job) error + func LoadAllJobsTypes(tx pg.Queryer, jobs []Job) error + func NewORM(db *sqlx.DB, chainSet evm.ChainSet, pipelineORM pipeline.ORM, ...) *orm + func NewSpawner(orm ORM, config Config, jobTypeDelegates map[Type]Delegate, db *sqlx.DB, ...) *spawner + func SendingKeysForJob(job *Job) (pq.StringArray, error) + type BlockhashStoreSpec struct + BlockhashStoreAddress ethkey.EIP55Address + CoordinatorV1Address *ethkey.EIP55Address + CoordinatorV2Address *ethkey.EIP55Address + CreatedAt time.Time + EVMChainID *utils.Big + FromAddresses []ethkey.EIP55Address + ID int32 + LookbackBlocks int32 + PollPeriod time.Duration + RunTimeout time.Duration + UpdatedAt time.Time + WaitBlocks int32 + type BootstrapSpec struct + BlockchainTimeout models.Interval + ContractConfigConfirmations uint16 + ContractConfigTrackerPollInterval models.Interval + ContractID string + CreatedAt time.Time + ID int32 + MonitoringEndpoint null.String + Relay relay.Network + RelayConfig JSONConfig + UpdatedAt time.Time + func (s BootstrapSpec) AsOCR2Spec() OCR2OracleSpec + type Config interface + DatabaseURL func() url.URL + TriggerFallbackDBPollInterval func() time.Duration + type CronSpec struct + CreatedAt time.Time + CronSchedule string + ID int32 + UpdatedAt time.Time + func (s *CronSpec) SetID(value string) error + func (s CronSpec) GetID() string + type DRSpecConfig interface + MinIncomingConfirmations func() uint32 + type Delegate interface + AfterJobCreated func(spec Job) + BeforeJobCreated func(spec Job) + BeforeJobDeleted func(spec Job) + JobType func() Type + ServicesForSpec func(spec Job) ([]ServiceCtx, error) + type DirectRequestSpec struct + ContractAddress ethkey.EIP55Address + CreatedAt time.Time + EVMChainID *utils.Big + ID int32 + MinContractPayment *assets.Link + MinIncomingConfirmations clnull.Uint32 + MinIncomingConfirmationsEnv bool + Requesters models.AddressCollection + UpdatedAt time.Time + func LoadEnvConfigVarsDR(cfg DRSpecConfig, drs DirectRequestSpec) *DirectRequestSpec + type ExternalInitiatorWebhookSpec struct + ExternalInitiator bridges.ExternalInitiator + ExternalInitiatorID int64 + Spec models.JSON + WebhookSpec WebhookSpec + WebhookSpecID int32 + type FluxMonitorSpec struct + AbsoluteThreshold tomlutils.Float32 + ContractAddress ethkey.EIP55Address + CreatedAt time.Time + DrumbeatEnabled bool + DrumbeatRandomDelay time.Duration + DrumbeatSchedule string + EVMChainID *utils.Big + ID int32 + IdleTimerDisabled bool + IdleTimerPeriod time.Duration + MinPayment *assets.Link + PollTimerDisabled bool + PollTimerPeriod time.Duration + Threshold tomlutils.Float32 + UpdatedAt time.Time + type JSONConfig map[string]interface + func (r *JSONConfig) Scan(value interface{}) error + func (r JSONConfig) Bytes() []byte + func (r JSONConfig) EVMChainID() (int64, error) + func (r JSONConfig) Value() (driver.Value, error) + type Job struct + BlockhashStoreSpec *BlockhashStoreSpec + BlockhashStoreSpecID *int32 + BootstrapSpec *BootstrapSpec + BootstrapSpecID *int32 + CreatedAt time.Time + CronSpec *CronSpec + CronSpecID *int32 + DirectRequestSpec *DirectRequestSpec + DirectRequestSpecID *int32 + ExternalJobID uuid.UUID + FluxMonitorSpec *FluxMonitorSpec + FluxMonitorSpecID *int32 + ForwardingAllowed bool + GasLimit clnull.Uint32 + ID int32 + JobSpecErrors []SpecError + KeeperSpec *KeeperSpec + KeeperSpecID *int32 + MaxTaskDuration models.Interval + Name null.String + OCR2OracleSpec *OCR2OracleSpec + OCR2OracleSpecID *int32 + OCROracleSpec *OCROracleSpec + OCROracleSpecID *int32 + Pipeline pipeline.Pipeline + PipelineSpec *pipeline.Spec + PipelineSpecID int32 + SchemaVersion uint32 + Type Type + VRFSpec *VRFSpec + VRFSpecID *int32 + WebhookSpec *WebhookSpec + WebhookSpecID *int32 + func (j *Job) SetID(value string) error + func (j Job) ExternalIDEncodeBytesToTopic() common.Hash + func (j Job) ExternalIDEncodeStringToTopic() common.Hash + type KeeperSpec struct + ContractAddress ethkey.EIP55Address + CreatedAt time.Time + EVMChainID *utils.Big + FromAddress ethkey.EIP55Address + ID int32 + MinIncomingConfirmations *uint32 + UpdatedAt time.Time + type NullDelegate struct + Type Type + func (n *NullDelegate) AfterJobCreated(spec Job) + func (n *NullDelegate) BeforeJobCreated(spec Job) + func (n *NullDelegate) BeforeJobDeleted(spec Job) + func (n *NullDelegate) JobType() Type + func (n *NullDelegate) ServicesForSpec(spec Job) (s []ServiceCtx, err error) + type OCR2OracleSpec struct + BlockchainTimeout models.Interval + ContractConfigConfirmations uint16 + ContractConfigTrackerPollInterval models.Interval + ContractID string + CreatedAt time.Time + ID int32 + MonitoringEndpoint null.String + OCRKeyBundleID null.String + P2PV2Bootstrappers pq.StringArray + PluginConfig JSONConfig + PluginType OCR2PluginType + Relay relay.Network + RelayConfig JSONConfig + RelayConfigMercuryConfig JSONConfig + TransmitterID null.String + UpdatedAt time.Time + func (s *OCR2OracleSpec) SetID(value string) error + func (s OCR2OracleSpec) GetID() string + type OCR2PluginType string + const DKG + const Median + const OCR2Functions + const OCR2Keeper + const OCR2VRF + type OCROracleSpec struct + BlockchainTimeout models.Interval + BlockchainTimeoutEnv bool + ContractAddress ethkey.EIP55Address + ContractConfigConfirmations uint16 + ContractConfigConfirmationsEnv bool + ContractConfigTrackerPollInterval models.Interval + ContractConfigTrackerPollIntervalEnv bool + ContractConfigTrackerSubscribeInterval models.Interval + ContractConfigTrackerSubscribeIntervalEnv bool + ContractTransmitterTransmitTimeout *models.Interval + ContractTransmitterTransmitTimeoutEnv bool + CreatedAt time.Time + DatabaseTimeout *models.Interval + DatabaseTimeoutEnv bool + EVMChainID *utils.Big + EncryptedOCRKeyBundleID *models.Sha256Hash + EncryptedOCRKeyBundleIDEnv bool + ID int32 + IsBootstrapPeer bool + ObservationGracePeriod *models.Interval + ObservationGracePeriodEnv bool + ObservationTimeout models.Interval + ObservationTimeoutEnv bool + P2PBootstrapPeers pq.StringArray + P2PV2Bootstrappers pq.StringArray + TransmitterAddress *ethkey.EIP55Address + TransmitterAddressEnv bool + UpdatedAt time.Time + func LoadEnvConfigVarsLocalOCR(cfg OCRSpecConfig, os OCROracleSpec) *OCROracleSpec + func LoadEnvConfigVarsOCR(cfg OCRSpecConfig, p2pStore keystore.P2P, os OCROracleSpec) (*OCROracleSpec, error) + func (s *OCROracleSpec) SetID(value string) error + func (s OCROracleSpec) GetID() string + type OCRSpecConfig interface + OCRBlockchainTimeout func() time.Duration + OCRContractConfirmations func() uint16 + OCRContractPollInterval func() time.Duration + OCRContractSubscribeInterval func() time.Duration + OCRContractTransmitterTransmitTimeout func() time.Duration + OCRDatabaseTimeout func() time.Duration + OCRKeyBundleID func() (string, error) + OCRObservationGracePeriod func() time.Duration + OCRObservationTimeout func() time.Duration + OCRTransmitterAddress func() (ethkey.EIP55Address, error) + P2PPeerID func() p2pkey.PeerID + type ORM interface + AssertBridgesExist func(p pipeline.Pipeline) error + Close func() error + CountPipelineRunsByJobID func(jobID int32) (count int32, err error) + CreateJob func(jb *Job, qopts ...pg.QOpt) error + DeleteJob func(id int32, qopts ...pg.QOpt) error + DismissError func(ctx context.Context, errorID int64) error + FindJob func(ctx context.Context, id int32) (Job, error) + FindJobByExternalJobID func(uuid uuid.UUID, qopts ...pg.QOpt) (Job, error) + FindJobIDByAddress func(address ethkey.EIP55Address, evmChainID *utils.Big, qopts ...pg.QOpt) (int32, error) + FindJobIDsWithBridge func(name string) ([]int32, error) + FindJobTx func(id int32) (Job, error) + FindJobWithoutSpecErrors func(id int32) (jb Job, err error) + FindJobs func(offset, limit int) ([]Job, int, error) + FindJobsByPipelineSpecIDs func(ids []int32) ([]Job, error) + FindPipelineRunByID func(id int64) (pipeline.Run, error) + FindPipelineRunIDsByJobID func(jobID int32, offset, limit int) (ids []int64, err error) + FindPipelineRunsByIDs func(ids []int64) (runs []pipeline.Run, err error) + FindSpecError func(id int64, qopts ...pg.QOpt) (SpecError, error) + FindSpecErrorsByJobIDs func(ids []int32, qopts ...pg.QOpt) ([]SpecError, error) + FindTaskResultByRunIDAndTaskName func(runID int64, taskName string, qopts ...pg.QOpt) ([]byte, error) + InsertJob func(job *Job, qopts ...pg.QOpt) error + InsertWebhookSpec func(webhookSpec *WebhookSpec, qopts ...pg.QOpt) error + PipelineRuns func(jobID *int32, offset, size int) ([]pipeline.Run, int, error) + RecordError func(jobID int32, description string, qopts ...pg.QOpt) error + TryRecordError func(jobID int32, description string, qopts ...pg.QOpt) + type ORMConfig interface + DatabaseDefaultQueryTimeout func() time.Duration + type PipelineRun struct + ID int64 + func (pr *PipelineRun) SetID(value string) error + func (pr PipelineRun) GetID() string + type Service interface + Close func() error + Start func() error + type ServiceAdapter interface + type ServiceCtx interface + Close func() error + Start func(context.Context) error + func NewServiceAdapter(service Service) ServiceCtx + type Spawner interface + ActiveJobs func() map[int32]Job + CreateJob func(jb *Job, qopts ...pg.QOpt) (err error) + DeleteJob func(jobID int32, qopts ...pg.QOpt) error + StartService func(ctx context.Context, spec Job) error + type SpecError struct + CreatedAt time.Time + Description string + ID int64 + JobID int32 + Occurrences uint + UpdatedAt time.Time + func (j *SpecError) SetID(value string) error + type Type string + const BlockhashStore + const Bootstrap + const Cron + const DirectRequest + const FluxMonitor + const Keeper + const OffchainReporting + const OffchainReporting2 + const VRF + const Webhook + func ValidateSpec(ts string) (Type, error) + func (t Type) RequiresPipelineSpec() bool + func (t Type) SchemaVersion() uint32 + func (t Type) String() string + func (t Type) SupportsAsync() bool + type VRFSpec struct + BackoffInitialDelay time.Duration + BackoffMaxDelay time.Duration + BatchCoordinatorAddress *ethkey.EIP55Address + BatchFulfillmentEnabled bool + BatchFulfillmentGasMultiplier tomlutils.Float64 + ChunkSize uint32 + ConfirmationsEnv bool + CoordinatorAddress ethkey.EIP55Address + CreatedAt time.Time + EVMChainID *utils.Big + FromAddresses []ethkey.EIP55Address + GasLanePrice *assets.Wei + ID int32 + MinIncomingConfirmations uint32 + PollPeriod time.Duration + PollPeriodEnv bool + PublicKey secp256k1.PublicKey + RequestTimeout time.Duration + RequestedConfsDelay int64 + UpdatedAt time.Time + func LoadEnvConfigVarsVRF(cfg DRSpecConfig, vrfs VRFSpec) *VRFSpec + type WebhookSpec struct + CreatedAt time.Time + ExternalInitiatorWebhookSpecs []ExternalInitiatorWebhookSpec + ID int32 + UpdatedAt time.Time + func (w *WebhookSpec) SetID(value string) error + func (w WebhookSpec) GetID() string