Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task interface { Name() string State() TaskState SetState(TaskState, ...string) Duration() time.Duration Messages() []string Child(name string) Task Children() []Task Lineage() []Task }
Task provides methods to represent the state of a runnable work item.
func NewTask ¶
func NewTask(updateHandler UpdateHandler) Task
type TaskState ¶
type TaskState int
TaskState represents the current state of a task
const ( // TaskStatePending indicates that a task has not yet started. TaskStatePending TaskState = iota // TaskStateInProgress indicates that a task is currently running. TaskStateInProgress // TaskStateSuccess indicates that a task has completed successfully. TaskStateSuccess // TaskStateWarning indicates that a task has completed with a non-fatal error condition. TaskStateWarning // TaskStateFailed indicates that a task has completed with a fatal error condition. TaskStateFailed )
type UpdateHandler ¶
type UpdateHandler func(updatedTask Task)
UpdateHandler receives updates from a Task
Click to show internal directories.
Click to hide internal directories.