Versions in this module Expand all Collapse all v0 v0.0.5 Dec 31, 2021 v0.0.4 Nov 21, 2021 v0.0.3 Oct 26, 2021 v0.0.2 Oct 11, 2021 Changes in this version + const InputTaskKey + var ErrBadInput = errors.New("bad input for task") + 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 ErrParameterEmpty = errors.New("parameter is empty") + 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, txManager TxManager) *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 + 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 + 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 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) ErrorsDB() RunErrors + func (result FinalResult) HasErrors() bool + func (result FinalResult) OutputsDB() JSONSerializable + 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) 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 KeyStore interface + GetRoundRobinAddress func(addrs ...common.Address) (common.Address, 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 + 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) + InsertFinishedRun func(db *gorm.DB, run Run, trrs []TaskRunResult, saveSuccessfulTaskRuns bool) (runID int64, 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) 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 + CreatedAt time.Time + Errors RunErrors + FinishedAt *time.Time + ID int64 + Meta JSONSerializable + Outputs JSONSerializable + PipelineSpec Spec + PipelineSpecID int32 + PipelineTaskRuns []TaskRun + func (Run) TableName() string + 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 int + const RunStatusCompleted + const RunStatusErrored + const RunStatusInProgress + 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) + 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 *time.Time + ID int64 + Index int32 + Output *JSONSerializable + PipelineRun Run + PipelineRunID int64 + Type TaskType + func (TaskRun) TableName() string + 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 time.Time + ID int64 + Result Result + Task Task + TaskRun TaskRun + 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 models.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 VRFTask struct + 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{})