Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resume ¶
func Resume()
Resume resumes sched and start executing tasks this is a pair call with Pause(), Resume() must be called second
Types ¶
type Task ¶
type Task interface { // GetID must returns a unique ID for all of the scheduled task. GetID() (id string) // GetExecution returns the time for task execution. GetExecution() (execute time.Time) // GetRetryTime returns the retry time if a task was failed. GetRetryTime() (execute time.Time) // Execute executes the actual task, it can return a result, // or if the task need a retry, or it was failed in this execution. Execute() (result interface{}, retry bool, fail error) }
Task interface for sched
type TaskFuture ¶
type TaskFuture interface {
Get() interface{}
}
TaskFuture is the future of Task execution
Click to show internal directories.
Click to hide internal directories.