Documentation ¶
Index ¶
Constants ¶
View Source
const ( TaskTypeRandom = "random" TaskTypeFailing = "failing" TaskTypeParser = "parser" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTaskArgs ¶
type CreateTaskArgs struct { ID int `json:"id"` Type string `json:"type"` Code string `json:"code"` Title string `json:"title"` Description string `json:"description"` Active bool `json:"active"` Display bool `json:"display"` Schedule string `json:"schedule"` Category string `json:"category"` Tags []string `json:"tags"` Args json.RawMessage `json:"args"` }
type SystemSymmary ¶
type Task ¶
type Task struct { ID int Type string Code string Title string Description string Active bool Display bool Schedule string Category *TaskCategory Metrics []*Metric Tags []*TaskTag Args TaskArgs `json:"-"` ResolveFn func(context.Context, *Task, *TaskInstance) (*TaskInstance, error) `json:"-"` }
func (*Task) JSONString ¶
type TaskCategory ¶
type TaskInstance ¶
type TaskInstance struct { ID int TaskID int StartTime time.Time EndTime time.Time Success bool Running bool Error error Attempt int Items []*Item Meta map[string]interface{} }
func InitTaskInstance ¶
func InitTaskInstance(taskID int, attempt int) *TaskInstance
func (*TaskInstance) WithError ¶
func (ti *TaskInstance) WithError(err error, items []*Item) *TaskInstance
func (*TaskInstance) WithSuccess ¶
func (ti *TaskInstance) WithSuccess(items []*Item) *TaskInstance
Source Files ¶
Click to show internal directories.
Click to hide internal directories.