Documentation
¶
Index ¶
- func AddCronTask(spec string, f func(ctx context.Context), timeout ...time.Duration)
- func AddDelayTask(delay time.Duration, f func(ctx context.Context), timeout ...time.Duration)
- func AddEveryTask(interval time.Duration, f func(ctx context.Context), timeout ...time.Duration)
- func AddOnceTask(runAt time.Time, f func(ctx context.Context), timeout ...time.Duration)
- func AddTask(spec string, f func())deprecated
- func Shutdown(code string, ctx context.Context) error
- func Startup(code, port string) error
- func WrapCronTask(f func(ctx context.Context), doneCallback func(), timeout ...time.Duration) func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCronTask ¶ added in v0.0.43
func AddDelayTask ¶ added in v0.0.47
AddDelayTask adds a task that runs after a specified delay.
func AddEveryTask ¶ added in v0.0.47
AddEveryTask is a convenience function to add a task that runs at a regular interval.
func AddOnceTask ¶ added in v0.0.47
AddOnceTask adds a task that runs only once at the specified time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.