Categorygithub.com/spoke-d/task
modulepackage
0.0.0-20200908093724-88f1b8619d07
Repository: https://github.com/spoke-d/task.git
Documentation: pkg.go.dev

# README

task

Task management

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Backoff returns a Schedule that will attempt to backoff if there is a error passed.
Daily is a convenience for creating a schedule that runs once a day.
Every returns a Schedule that always returns the given time interval.
NewGroup creates a Group with sane defaults.
Start a single task executing the given function with the given schedule.

# Variables

ErrBackoff is a special error that may be returned by a Schedule function to mean backoff the interval, before re-evaluating the interval of the next execution.
ErrSkip is a special error that may be returned by a Schedule function to mean to skip a particular execution of the task function, and just wait the returned interval before re-evaluating.
ErrTerminate is a special error that may be returned by a task function to terminate the task.
Linear describes a backoff function that grows linearly with time.
SkipFirst is an option for the Every schedule that will make the schedule skip the very first invocation of the task function.

# Structs

Group of tasks sharing the same lifecycle.
Task executes a certain function periodically, according to a certain schedule.

# Interfaces

BackoffOptions represents a way to set optional values to a backoff option.
Clock represents the passage of time in a way that can be faked out for tests.
EveryOptions represents a way to set optional values to a every option.

# Type aliases

BackoffFunc is a type that represents a way to describe what the interval time should be for each backoff request.
BackoffOption captures a tweak that can be applied to the Backoff schedule.
EveryOption captures a tweak that can be applied to the Every schedule.
Func captures the signature of a function executable by a Task.
Schedule captures the signature of a schedule function.