Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExecutorNotDefined = errors.New("executor not defined for this task")
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
ScheduleTask(ctx context.Context, task string, scheduleAt time.Time, payload []byte) error
Start(ctx context.Context) <-chan error
RegisterExecutor(task string, executor JobExecutor)
}
func NewDiscard ¶
func NewDiscard() Driver
type Storage ¶
type Storage interface {
Store(ctx context.Context, taskName string, scheduleAt time.Time, payload []byte) error
Retrieve(ctx context.Context) (taskID, taskName string, data []byte, err error)
Failure(ctx context.Context, taskID string) error
Done(ctx context.Context, taskID string) error
}
func NewFileScheduler ¶ added in v1.3.1
func NewFileScheduler() Storage
func NewRedisStorage ¶
func NewSQLStorage ¶
Click to show internal directories.
Click to hide internal directories.