Add cron tasks to distillery

This commit is contained in:
Tom Wiesing 2022-12-07 10:30:48 +01:00
parent 790460f9de
commit f52fe6abf3
No known key found for this signature in database
19 changed files with 353 additions and 141 deletions

View file

@ -0,0 +1,16 @@
package component
import (
"context"
)
// Cronable is a component that implements a cron method
type Cronable interface {
Component
// Name of the cron task being performed
TaskName() string
// Cron is called to run this cron task
Cron(ctx context.Context) error
}