Documentation
¶
Index ¶
- type CronJob
- type CronJobState
- type CronPayload
- type CronSchedule
- type CronService
- func (cs *CronService) AddJob(name string, schedule CronSchedule, message string, deliver bool, ...) (*CronJob, error)
- func (cs *CronService) EnableJob(jobID string, enabled bool) *CronJob
- func (cs *CronService) ListJobs(includeDisabled bool) []CronJob
- func (cs *CronService) Load() error
- func (cs *CronService) RemoveJob(jobID string) bool
- func (cs *CronService) SetOnJob(handler JobHandler)
- func (cs *CronService) Start() error
- func (cs *CronService) Status() map[string]any
- func (cs *CronService) Stop()
- func (cs *CronService) UpdateJob(job *CronJob) error
- type CronStore
- type JobHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CronJob ¶
type CronJob struct {
ID string `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
Schedule CronSchedule `json:"schedule"`
Payload CronPayload `json:"payload"`
State CronJobState `json:"state"`
CreatedAtMS int64 `json:"createdAtMs"`
UpdatedAtMS int64 `json:"updatedAtMs"`
DeleteAfterRun bool `json:"deleteAfterRun"`
}
type CronJobState ¶
type CronPayload ¶
type CronSchedule ¶
type CronService ¶
type CronService struct {
// contains filtered or unexported fields
}
func NewCronService ¶
func NewCronService(storePath string, onJob JobHandler) *CronService
func (*CronService) AddJob ¶
func (cs *CronService) AddJob( name string, schedule CronSchedule, message string, deliver bool, channel, to string, ) (*CronJob, error)
func (*CronService) EnableJob ¶
func (cs *CronService) EnableJob(jobID string, enabled bool) *CronJob
func (*CronService) ListJobs ¶
func (cs *CronService) ListJobs(includeDisabled bool) []CronJob
func (*CronService) Load ¶
func (cs *CronService) Load() error
func (*CronService) RemoveJob ¶
func (cs *CronService) RemoveJob(jobID string) bool
func (*CronService) SetOnJob ¶ added in v0.1.1
func (cs *CronService) SetOnJob(handler JobHandler)
func (*CronService) Start ¶
func (cs *CronService) Start() error
func (*CronService) Status ¶
func (cs *CronService) Status() map[string]any
func (*CronService) Stop ¶
func (cs *CronService) Stop()
func (*CronService) UpdateJob ¶ added in v0.1.1
func (cs *CronService) UpdateJob(job *CronJob) error
type JobHandler ¶
Click to show internal directories.
Click to hide internal directories.