Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 Changes in this version + var ErrCancelled = errors.New("task run cancelled (fail early)") + func ParseETHABIArgsString(theABI []byte, isLog bool) (args abi.Arguments, indexedArgs abi.Arguments, _ error) type BaseTask + MaxBackoff time.Duration + MinBackoff time.Duration + Retries null.Uint32 + func (t BaseTask) TaskMaxBackoff() time.Duration + func (t BaseTask) TaskMinBackoff() time.Duration + func (t BaseTask) TaskRetries() uint32 type CBORParseTask + Mode string + type ETHABIEncodeTask2 struct + ABI string + Data string + func (t *ETHABIEncodeTask2) Run(_ context.Context, vars Vars, inputs []Result) (Result, RunInfo) + func (t *ETHABIEncodeTask2) Type() TaskType type ETHCallTask + EVMChainID string + ExtractRevertReason bool + Gas string + GasFeeCap string + GasPrice string + GasTipCap string type ETHTxTask + EVMChainID string + MinConfirmations string + Simulate string + type EstimateGasLimitTask struct + Data string + EVMChainID string + From string + Input string + Multiplier string + To string + func (t *EstimateGasLimitTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result, runInfo RunInfo) + func (t *EstimateGasLimitTask) Type() TaskType + type FailTask struct + Msg string + func (t *FailTask) Run(_ context.Context, vars Vars, _ []Result) (Result, RunInfo) + func (t *FailTask) Type() TaskType type FinalResult + AllErrors []error + FatalErrors []error + func (result FinalResult) HasFatalErrors() bool + type GasEstimator interface + EstimateGas func(ctx context.Context, call ethereum.CallMsg) (uint64, error) type JSONSerializable + Valid bool + func JSONSerializableFrom(val interface{}) JSONSerializable + func NewJSONSerializable(val interface{}, valid bool) JSONSerializable type MapParam + func (m MapParam) Map() map[string]interface{} + type MaybeBigIntParam struct + func (p *MaybeBigIntParam) UnmarshalPipelineParam(val interface{}) error + func (p MaybeBigIntParam) BigInt() *big.Int + type MemoTask struct + Value string + func (t *MemoTask) Run(_ context.Context, vars Vars, inputs []Result) (Result, RunInfo) + func (t *MemoTask) Type() TaskType + type MergeTask struct + Left string + Right string + func (t *MergeTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result, runInfo RunInfo) + func (t *MergeTask) Type() TaskType + type Method struct + Inputs abi.Arguments + Name string type ORM + DeleteRun func(id int64) error + type ObjectParam struct + BoolValue BoolParam + DecimalValue DecimalParam + MapValue MapParam + SliceValue SliceParam + StringValue StringParam + Type ObjectType + func MustNewObjectParam(val interface{}) *ObjectParam + func (o *ObjectParam) UnmarshalPipelineParam(val interface{}) error + func (o ObjectParam) Marshal() (string, error) + func (o ObjectParam) MarshalJSON() ([]byte, error) + func (o ObjectParam) String() string + type ObjectType int + const BoolType + const DecimalType + const MapType + const NilType + const SliceType + const StringType type Pipeline + func (p *Pipeline) RequiresPreInsert() bool + type ResumeRequest struct + Error null.String + Value json.RawMessage + func (rr ResumeRequest) ToResult() (Result, error) type Run + AllErrors RunErrors + FatalErrors RunErrors + func (r Run) HasFatalErrors() bool + type RunInfo struct + IsPending bool + IsRetryable bool type Runner + OnRunFinished func(func(*Run)) + ResumeRun func(taskID uuid.UUID, value interface{}, err error) error type Task + TaskMaxBackoff func() time.Duration + TaskMinBackoff func() time.Duration + TaskRetries func() uint32 type TaskRunResult + Attempts uint type TaskType + const TaskTypeETHABIEncode2 + const TaskTypeEstimateGasLimit + const TaskTypeFail + const TaskTypeMemo + const TaskTypeMerge + const TaskTypeVRFV2 + type VRFTaskV2 struct + PublicKey string + RequestBlockHash string + RequestBlockNumber string + Topics string + func (t *VRFTaskV2) Run(_ context.Context, vars Vars, inputs []Result) (result Result, runInfo RunInfo) + func (t *VRFTaskV2) Type() TaskType v1.10.16 Oct 18, 2021 Changes in this version + const InputTaskKey + var ErrBadInput = errors.New("bad input for task") + var ErrInputTaskErrored = errors.New("input task errored") + var ErrKeypathNotFound = errors.New("keypath not found") + var ErrKeypathTooDeep = errors.New("keypath too deep (maximum 2 keys)") + var ErrNoSuchBridge = errors.New("no such bridge exists") + var ErrOverflow = errors.New("overflow") + var ErrParameterEmpty = errors.New("parameter is empty") + var ErrPending = errors.New("pending") + var ErrTaskRunFailed = errors.New("task run failed") + var ErrTimeout = errors.New("timeout") + var ErrTooManyErrors = errors.New("too many errors") + var ErrVarsRoot = errors.New("cannot get/set the root of a pipeline.Vars") + var ErrWrongInputCardinality = errors.New("wrong number of task inputs") + var PromPipelineRunErrors = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var PromPipelineRunTotalTimeToCompletion = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var PromPipelineTaskExecutionTime = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var PromPipelineTasksTotalFinished = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + func CheckInputs(inputs []Result, minLen, maxLen, maxErrors int) ([]interface{}, error) + func NewORM(db *gorm.DB) *orm + func NewRunner(orm ORM, config Config, ethClient eth.Client, ethks ETHKeyStore, ...) *runner + func ResolveParam(out PipelineParamUnmarshaler, getters []GetterFunc) error + type AddressParam common.Address + func (a *AddressParam) UnmarshalPipelineParam(val interface{}) error + type AddressSliceParam []common.Address + func (s *AddressSliceParam) UnmarshalPipelineParam(val interface{}) error + type AnyTask struct + func (t *AnyTask) Run(_ context.Context, _ Vars, inputs []Result) (result Result) + func (t *AnyTask) Type() TaskType + type BaseTask struct + FailEarly string + Index int32 + Timeout time.Duration + func NewBaseTask(id int, dotID string, inputs, outputs []Task, index int32) BaseTask + func (t *BaseTask) Base() *BaseTask + func (t BaseTask) DotID() string + func (t BaseTask) ID() int + func (t BaseTask) Inputs() []Task + func (t BaseTask) OutputIndex() int32 + func (t BaseTask) Outputs() []Task + func (t BaseTask) TaskTimeout() (time.Duration, bool) + type BoolParam bool + func (b *BoolParam) UnmarshalPipelineParam(val interface{}) error + type BridgeTask struct + Async string + IncludeInputAtKey string + Name string + RequestData string + func (t *BridgeTask) Run(ctx context.Context, vars Vars, inputs []Result) Result + func (t *BridgeTask) Type() TaskType + type BytesParam []byte + func (b *BytesParam) UnmarshalPipelineParam(val interface{}) error + type CBORParseTask struct + Data string + func (t *CBORParseTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *CBORParseTask) Type() TaskType + type Config interface + BridgeResponseURL func() *url.URL + DatabaseMaximumTxDuration func() time.Duration + DatabaseURL func() url.URL + DefaultHTTPAllowUnrestrictedNetworkAccess func() bool + DefaultHTTPLimit func() int64 + DefaultHTTPTimeout func() models.Duration + DefaultMaxHTTPAttempts func() uint + EthGasLimitDefault func() uint64 + EthMaxQueuedTransactions func() uint64 + JobPipelineMaxRunDuration func() time.Duration + JobPipelineReaperInterval func() time.Duration + JobPipelineReaperThreshold func() time.Duration + TriggerFallbackDBPollInterval func() time.Duration + type DecimalParam decimal.Decimal + func (d *DecimalParam) UnmarshalPipelineParam(val interface{}) error + func (d DecimalParam) Decimal() decimal.Decimal + type DecimalSliceParam []decimal.Decimal + func (s *DecimalSliceParam) UnmarshalPipelineParam(val interface{}) error + type DivideTask struct + Divisor string + Input string + Precision string + func (t *DivideTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *DivideTask) Type() TaskType + type ETHABIDecodeLogTask struct + ABI string + Data string + Topics string + func (t *ETHABIDecodeLogTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *ETHABIDecodeLogTask) Type() TaskType + type ETHABIDecodeTask struct + ABI string + Data string + func (t *ETHABIDecodeTask) Run(_ context.Context, vars Vars, inputs []Result) Result + func (t *ETHABIDecodeTask) Type() TaskType + type ETHABIEncodeTask struct + ABI string + Data string + func (t *ETHABIEncodeTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *ETHABIEncodeTask) Type() TaskType + type ETHCallTask struct + Contract string + Data string + func (t *ETHCallTask) Run(ctx context.Context, vars Vars, inputs []Result) (result Result) + func (t *ETHCallTask) Type() TaskType + type ETHKeyStore interface + GetRoundRobinAddress func(addrs ...common.Address) (common.Address, error) + type ETHTxTask struct + Data string + From string + GasLimit string + To string + TxMeta string + func (t *ETHTxTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *ETHTxTask) Type() TaskType + type ErrRunPanicked struct + func (err ErrRunPanicked) Error() string + type FinalResult struct + Errors []error + Values []interface{} + func (result FinalResult) HasErrors() bool + func (result FinalResult) SingularResult() (Result, error) + type GetterFunc func() (interface{}, error) + func From(getters ...interface{}) []GetterFunc + func Input(inputs []Result, index int) GetterFunc + func Inputs(inputs []Result) GetterFunc + func JSONWithVarExprs(s string, vars Vars, allowErrors bool) GetterFunc + func NonemptyString(s string) GetterFunc + func VarExpr(s string, vars Vars) GetterFunc + type Graph struct + func NewGraph() *Graph + func (g *Graph) NewNode() graph.Node + func (g *Graph) UnmarshalText(bs []byte) (err error) + type GraphNode struct + func NewGraphNode(n graph.Node, dotID string, attrs map[string]string) *GraphNode + func (n *GraphNode) Attributes() []encoding.Attribute + func (n *GraphNode) DOTID() string + func (n *GraphNode) SetAttribute(attr encoding.Attribute) error + func (n *GraphNode) SetDOTID(id string) + func (n *GraphNode) String() string + type HTTPTask struct + AllowUnrestrictedNetworkAccess string + Method string + RequestData string + URL string + func (t *HTTPTask) Run(ctx context.Context, vars Vars, inputs []Result) Result + func (t *HTTPTask) Type() TaskType + type HashSliceParam []common.Hash + func (s *HashSliceParam) UnmarshalPipelineParam(val interface{}) error + type JSONParseTask struct + Data string + Lax string + Path string + func (t *JSONParseTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *JSONParseTask) Type() TaskType + type JSONPathParam []string + func (p *JSONPathParam) UnmarshalPipelineParam(val interface{}) error + type JSONSerializable struct + Null bool + Val interface{} + func (js *JSONSerializable) Empty() bool + func (js *JSONSerializable) Scan(value interface{}) error + func (js *JSONSerializable) UnmarshalJSON(bs []byte) error + func (js JSONSerializable) MarshalJSON() ([]byte, error) + func (js JSONSerializable) Value() (driver.Value, error) + type Keypath [2][]byte + func (keypath Keypath) NumParts() int + func (keypath Keypath) String() string + type MapParam map[string]interface + func (m *MapParam) UnmarshalPipelineParam(val interface{}) error + type MaybeInt32Param struct + func (p *MaybeInt32Param) UnmarshalPipelineParam(val interface{}) error + func (p MaybeInt32Param) Int32() (int32, bool) + type MaybeUint64Param struct + func (p *MaybeUint64Param) UnmarshalPipelineParam(val interface{}) error + func (p MaybeUint64Param) Uint64() (uint64, bool) + type MeanTask struct + AllowedFaults string + Precision string + Values string + func (t *MeanTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *MeanTask) Type() TaskType + type MedianTask struct + AllowedFaults string + Values string + func (t *MedianTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *MedianTask) Type() TaskType + type ModeTask struct + AllowedFaults string + Values string + func (t *ModeTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *ModeTask) Type() TaskType + type MultiplyTask struct + Input string + Times string + func (t *MultiplyTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *MultiplyTask) Type() TaskType + type ORM interface + CreateRun func(db *gorm.DB, run *Run) (err error) + CreateSpec func(ctx context.Context, tx *gorm.DB, pipeline Pipeline, ...) (int32, error) + DB func() *gorm.DB + DeleteRunsOlderThan func(threshold time.Duration) error + FindRun func(id int64) (Run, error) + GetAllRuns func() ([]Run, error) + GetUnfinishedRuns func(now time.Time, fn func(run Run) error) error + InsertFinishedRun func(db *gorm.DB, run Run, trrs []TaskRunResult, saveSuccessfulTaskRuns bool) (runID int64, err error) + StoreRun func(db *sql.DB, run *Run) (restart bool, err error) + UpdateTaskRunResult func(db *sql.DB, taskID uuid.UUID, result interface{}) (run Run, start bool, err error) + type PanicTask struct + Msg string + func (t *PanicTask) Run(_ context.Context, vars Vars, _ []Result) (result Result) + func (t *PanicTask) Type() TaskType + type Pipeline struct + Source string + Tasks []Task + func Parse(text string) (*Pipeline, error) + func (p *Pipeline) ByDotID(id string) Task + func (p *Pipeline) HasAsync() bool + func (p *Pipeline) MinTimeout() (time.Duration, bool, error) + func (p *Pipeline) UnmarshalText(bs []byte) (err error) + type PipelineParamUnmarshaler interface + UnmarshalPipelineParam func(val interface{}) error + type PossibleErrorResponses struct + Error string + ErrorMessage string + type Result struct + Error error + Value interface{} + func (result Result) ErrorDB() null.String + func (result Result) OutputDB() JSONSerializable + type Run struct + Async bool + CreatedAt time.Time + Errors RunErrors + FailEarly bool + FinishedAt null.Time + ID int64 + Inputs JSONSerializable + Meta JSONSerializable + Outputs JSONSerializable + Pending bool + PipelineSpec Spec + PipelineSpecID int32 + PipelineTaskRuns []TaskRun + State RunStatus + func NewRun(spec Spec, vars Vars) Run + func (Run) TableName() string + func (r *Run) ByDotID(id string) *TaskRun + func (r *Run) SetID(value string) error + func (r *Run) Status() RunStatus + func (r Run) GetID() string + func (r Run) HasErrors() bool + type RunErrors []null.String + func (re *RunErrors) Scan(value interface{}) error + func (re RunErrors) HasError() bool + func (re RunErrors) Value() (driver.Value, error) + type RunStatus string + const RunStatusCompleted + const RunStatusErrored + const RunStatusRunning + const RunStatusSuspended + const RunStatusUnknown + func (s RunStatus) Completed() bool + func (s RunStatus) Errored() bool + func (s RunStatus) Finished() bool + type RunWithResults struct + Run Run + TaskRunResults TaskRunResults + type Runner interface + ExecuteAndInsertFinishedRun func(ctx context.Context, spec Spec, vars Vars, l logger.Logger, ...) (runID int64, finalResult FinalResult, err error) + ExecuteRun func(ctx context.Context, spec Spec, vars Vars, l logger.Logger) (run Run, trrs TaskRunResults, err error) + InsertFinishedRun func(db *gorm.DB, run Run, trrs TaskRunResults, saveSuccessfulTaskRuns bool) (int64, error) + Run func(ctx context.Context, run *Run, l logger.Logger, saveSuccessfulTaskRuns bool) (incomplete bool, err error) + TestInsertFinishedRun func(db *gorm.DB, jobID int32, jobName string, jobType string, specID int32) (int64, error) + type SliceParam []interface + func (s *SliceParam) UnmarshalPipelineParam(val interface{}) error + func (s SliceParam) FilterErrors() (SliceParam, int) + type Spec struct + CreatedAt time.Time + DotDagSource string + ID int32 + JobID int32 + JobName string + MaxTaskDuration models.Interval + func (Spec) TableName() string + func (s Spec) Pipeline() (*Pipeline, error) + type StringParam string + func (s *StringParam) UnmarshalPipelineParam(val interface{}) error + type SumTask struct + AllowedFaults string + Values string + func (t *SumTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *SumTask) Type() TaskType + type Task interface + Base func() *BaseTask + DotID func() string + ID func() int + Inputs func() []Task + OutputIndex func() int32 + Outputs func() []Task + Run func(ctx context.Context, vars Vars, inputs []Result) Result + TaskTimeout func() (time.Duration, bool) + Type func() TaskType + func UnmarshalTaskFromMap(taskType TaskType, taskMap interface{}, ID int, dotID string) (_ Task, err error) + type TaskRun struct + CreatedAt time.Time + DotID string + Error null.String + FinishedAt null.Time + ID uuid.UUID + Index int32 + Output *JSONSerializable + PipelineRun Run + PipelineRunID int64 + Type TaskType + func (TaskRun) TableName() string + func (tr *TaskRun) IsPending() bool + func (tr *TaskRun) SetID(value string) error + func (tr TaskRun) GetDotID() string + func (tr TaskRun) GetID() string + func (tr TaskRun) Result() Result + type TaskRunResult struct + CreatedAt time.Time + FinishedAt null.Time + ID uuid.UUID + Result Result + Task Task + TaskRun TaskRun + func (result *TaskRunResult) IsPending() bool + func (result *TaskRunResult) IsTerminal() bool + type TaskRunResults []TaskRunResult + func (trrs TaskRunResults) FinalResult() FinalResult + type TaskType string + const TaskTypeAny + const TaskTypeBridge + const TaskTypeCBORParse + const TaskTypeDivide + const TaskTypeETHABIDecode + const TaskTypeETHABIDecodeLog + const TaskTypeETHABIEncode + const TaskTypeETHCall + const TaskTypeETHTx + const TaskTypeHTTP + const TaskTypeJSONParse + const TaskTypeMean + const TaskTypeMedian + const TaskTypeMode + const TaskTypeMultiply + const TaskTypePanic + const TaskTypeSum + const TaskTypeVRF + func (t TaskType) String() string + type TxManager interface + CreateEthTransaction func(db *gorm.DB, fromAddress, toAddress common.Address, payload []byte, ...) (etx bulletprooftxmanager.EthTx, err error) + type URLParam url.URL + func (u *URLParam) String() string + func (u *URLParam) UnmarshalPipelineParam(val interface{}) error + type Uint64Param uint64 + func (u *Uint64Param) UnmarshalPipelineParam(val interface{}) error + type VRFKeyStore interface + GenerateProof func(k secp256k1.PublicKey, seed *big.Int) (vrfkey.Proof, error) + type VRFTask struct + PublicKey string + RequestBlockHash string + RequestBlockNumber string + Topics string + func (t *VRFTask) Run(_ context.Context, vars Vars, inputs []Result) (result Result) + func (t *VRFTask) Type() TaskType + type Vars struct + func NewVarsFrom(m map[string]interface{}) Vars + func (vars Vars) Copy() Vars + func (vars Vars) Get(keypathStr string) (interface{}, error) + func (vars Vars) Set(dotID string, value interface{})