Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ErrInvalidCronSyntax = errors.New("invalid cron syntax")
View Source
var HandlerModule = fx.Module("cron_handlers", fx.Provide( NewHandlers, ), )
View Source
var SchedulerModule = fx.Module("cron_scheduler", fx.Provide( NewScheduler, ), )
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func NewAgent ¶
func NewAgent(p AgentParams) (*Agent, error)
type AgentParams ¶
type Cron ¶
type Cron struct {
// contains filtered or unexported fields
}
func (*Cron) RegisterCronjob ¶
type CronjobHandlerFn ¶
type CronjobHandlerFn func(ctx context.Context, data *cron.CronjobData) error
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func NewHandlers ¶
func (*Handlers) Add ¶
func (h *Handlers) Add(name string, fn CronjobHandlerFn)
type ICron ¶
type ICron interface { RegisterCronjob(ctx context.Context, job *cron.Cronjob) error UnregisterCronjob(ctx context.Context, name string) error }
func NewNoopCron ¶
func NewNoopCron() ICron
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(p SchedulerParams) (*Scheduler, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.