Documentation ¶
Index ¶
- type Dag
- func (dag *Dag) CreateJob(name string, task func() (map[string]string, error)) (*Job, error)
- func (dag *Dag) GetJob(name string) Job
- func (dag *Dag) GetJobEdges() []Edge
- func (dag *Dag) GetJobs() []JobBasics
- func (dag *Dag) JobExists(name string) bool
- func (dag *Dag) Run()
- func (dag *Dag) ShowJobStatuses()
- type Edge
- type Hooks
- type Job
- type JobBasics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dag ¶
type Dag struct { ID string Name string Jobs map[string]*Job JobsOrder []string Status string CreatedTs time.Time StartedTs time.Time FinishedTs time.Time }
Dag represents directed acyclic graph
func (*Dag) GetJobEdges ¶
GetJobEdges returns a list of job names
func (*Dag) ShowJobStatuses ¶
func (dag *Dag) ShowJobStatuses()
type Hooks ¶
type Hooks struct { DagCreated func(dag *Dag) DagStarted func(dag *Dag) DagFinishedSuccess func(dag *Dag) DagFinishedFailed func(dag *Dag) JobCreated func(job *Job) JobStarted func(job *Job) JobFinishedSuccess func(job *Job) JobFinishedFailed func(job *Job) }
Hooks define what happens on certain events like DAG start or JOB finished with error
type Job ¶
type Job struct { ID string Name string DagID string ParentJobs []*Job ChildJobs []*Job Status string CreatedTs time.Time StartedTs time.Time FinishedTs time.Time Data map[string]string Responses map[string]string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.