Documentation ¶
Index ¶
- type Job
- func (job *Job) AddConfig(key string, value interface{}) *Job
- func (job *Job) AddPrivate(key string, value interface{}) *Job
- func (job *Job) AddPublic(key string, value interface{}) *Job
- func (job *Job) CategoryValue() interface{}
- func (job *Job) DecErrorCounter()
- func (job *Job) Failed() *Result
- func (job *Job) Fields() []interface{}
- func (job *Job) Finished(value Status)
- func (job *Job) IncErrorCounter()
- func (job *Job) LastErrorMessage() string
- func (job *Job) Pending() *Result
- func (job *Job) PrettyJSON() string
- func (job *Job) SetCategory(value string) *Job
- func (job *Job) SetExclusive(value bool) *Job
- func (job *Job) SetID(value string) *Job
- func (job *Job) SetLastError(value string) *Job
- func (job *Job) SetMaxAttempts(value int) *Job
- func (job *Job) SetMaxOccurrences(value int) *Job
- func (job *Job) SetName(value string) *Job
- func (job *Job) SetNamespace(value string) *Job
- func (job *Job) SetOrigin(value string) *Job
- func (job *Job) SetPriority(value Priority) *Job
- func (job *Job) SetPriorityCritical() *Job
- func (job *Job) SetPriorityHigh() *Job
- func (job *Job) SetPriorityLow() *Job
- func (job *Job) SetPriorityMedium() *Job
- func (job *Job) SetPriorityNone() *Job
- func (job *Job) SetRunAfter(value time.Time) *Job
- func (job *Job) Succeeded() *Result
- func (job *Job) WorkflowValue() interface{}
- type Priority
- type Result
- func (r *Result) Error() string
- func (r *Result) Fields() []interface{}
- func (r *Result) SetDuration(duration time.Duration) *Result
- func (r *Result) SetError(msg string) *Result
- func (r *Result) SetErrorf(msg string, p ...interface{}) *Result
- func (r *Result) SetNextStep(nextStep string) *Result
- func (r *Result) SetValue(value string) *Result
- type Status
- type Step
- type Workflow
- func (wf *Workflow) AddData(key string, value interface{}) *Workflow
- func (wf *Workflow) Fields() []interface{}
- func (wf *Workflow) Finished()
- func (wf *Workflow) SetData(data map[string]interface{}) *Workflow
- func (wf *Workflow) SetDescription(value string) *Workflow
- func (wf *Workflow) SetExternalID(value string) *Workflow
- func (wf *Workflow) SetID(value string) *Workflow
- func (wf *Workflow) SetName(value string) *Workflow
- func (wf *Workflow) SetOrigin(value string) *Workflow
- func (wf *Workflow) SetPriority(value Priority) *Workflow
- func (wf *Workflow) SetPriorityCritical() *Workflow
- func (wf *Workflow) SetPriorityHigh() *Workflow
- func (wf *Workflow) SetPriorityLow() *Workflow
- func (wf *Workflow) SetPriorityMedium() *Workflow
- func (wf *Workflow) SetPriorityNone() *Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { ID string `bson:"_id" json:"id"` Name string `bson:"name" json:"name"` Namespace string `bson:"namespace" json:"namespace"` Type string `bson:"type" json:"type"` Origin string `bson:"origin" json:"origin"` Priority Priority `bson:"priority" json:"priority"` Config map[string]interface{} `bson:"config" json:"config"` Public map[string]interface{} `bson:"public" json:"public"` Private map[string]interface{} `bson:"private" json:"private"` RunAfter time.Time `bson:"run_after" json:"run_after"` Exclusive bool `bson:"exclusive" json:"exclusive"` MaxOccurrences int `bson:"max_occurrences" json:"max_occurrences"` MaxAttempts int `bson:"max_attempts" json:"max_attempts"` Category *string `bson:"category" json:"category"` Workflow *string `bson:"workflow" json:"workflow"` CreatedAt time.Time `bson:"created_at" json:"created_at"` Status Status `bson:"status" json:"status"` Attempt int `bson:"attempt" json:"attempt"` Session int `bson:"session" json:"session"` Result *Result `bson:"result" json:"result"` FinishedAt *time.Time `bson:"finished_at" json:"finished_at"` TimeReference time.Time `bson:"time_reference" json:"time_reference"` Weight int `bson:"weight" json:"weight"` ErrorCounter int `bson:"error_counter" json:"error_counter"` LastError *string `bson:"last_error" json:"last_error"` }
func (*Job) AddPrivate ¶
func (*Job) CategoryValue ¶
func (job *Job) CategoryValue() interface{}
func (*Job) DecErrorCounter ¶
func (job *Job) DecErrorCounter()
func (*Job) IncErrorCounter ¶
func (job *Job) IncErrorCounter()
func (*Job) LastErrorMessage ¶
func (*Job) PrettyJSON ¶
func (*Job) SetCategory ¶
func (*Job) SetExclusive ¶
func (*Job) SetLastError ¶
func (*Job) SetMaxAttempts ¶
func (*Job) SetMaxOccurrences ¶
func (*Job) SetNamespace ¶
func (*Job) SetPriority ¶
func (*Job) SetPriorityCritical ¶
func (*Job) SetPriorityHigh ¶
func (*Job) SetPriorityLow ¶
func (*Job) SetPriorityMedium ¶
func (*Job) SetPriorityNone ¶
func (*Job) WorkflowValue ¶
func (job *Job) WorkflowValue() interface{}
type Result ¶
type Result struct { Status Status `bson:"status" json:"status"` NextStep string `bson:"next_step" json:"next_step"` Value string `bson:"value" json:"value"` Duration time.Duration `bson:"duration" json:"duration"` ErrMsg string `bson:"error" json:"error"` Host string `bson:"host" json:"host"` Worker string `bson:"worker" json:"worker"` // contains filtered or unexported fields }
func (*Result) SetNextStep ¶
type Step ¶
type Step struct { Namespace string `bson:"namespace" json:"namespace"` Type string `bson:"type" json:"type"` Config map[string]interface{} `bson:"config" json:"config"` Exclusive bool `bson:"exclusive" json:"exclusive"` MaxOccurrences int `bson:"max_occurrences" json:"max_occurrences"` MaxAttempts int `bson:"max_attempts" json:"max_attempts"` Next map[string]interface{} `bson:"next" json:"next"` }
type Workflow ¶
type Workflow struct { ID string `bson:"_id" json:"id"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Origin string `bson:"origin" json:"origin"` Priority Priority `bson:"priority" json:"priority"` FirstStep string `bson:"first_step" json:"first_step"` AllSteps map[string]*Step `bson:"all_steps" json:"all_steps"` Data map[string]interface{} `bson:"data" json:"data"` ExternalID *string `bson:"external_id" json:"external_id"` CreatedAt time.Time `bson:"created_at" json:"created_at"` Status Status `bson:"status" json:"status"` FinishedAt *time.Time `bson:"finished_at" json:"finished_at"` }
func (*Workflow) SetDescription ¶
func (*Workflow) SetExternalID ¶
func (*Workflow) SetPriority ¶
func (*Workflow) SetPriorityCritical ¶
func (*Workflow) SetPriorityHigh ¶
func (*Workflow) SetPriorityLow ¶
func (*Workflow) SetPriorityMedium ¶
func (*Workflow) SetPriorityNone ¶
Click to show internal directories.
Click to hide internal directories.