Documentation
¶
Overview ¶
Package task implements background task that satisfies task.Tasker interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct {
// Name of the task, for logging purposes
Name string
// contains filtered or unexported fields
}
Task is a background task. It can be started and stopped. Before task is able to run, it must have Task.initialized=true and Task.loop set with Task.SetLoop(). Task recovers from panics in Task.loop. These panics are logged with stacktrace and then application exits.
func (*Task) Start ¶
Start starts task. If task is already running, or task loop is missing, task returns error
Click to show internal directories.
Click to hide internal directories.