Documentation
¶
Index ¶
- func GetJobKey(md *Metadata) string
- type Cronx
- func (cx *Cronx) AddFunc(spec string, cmd func(context.Context) error, mds ...map[string]string) (int, error)
- func (cx *Cronx) AddJob(spec string, job Job, mds ...map[string]string) (int, error)
- func (cx *Cronx) AddTimerFunc(t time.Time, cmd func(context.Context) error, mds ...map[string]string) int
- func (cx *Cronx) AddTimerJob(t time.Time, job Job, mds ...map[string]string) int
- func (cx *Cronx) Entries() []Entry
- func (cx *Cronx) Entry(id int) Entry
- func (cx *Cronx) Remove(id int)
- func (cx *Cronx) RunJob(job Job, mds ...map[string]string) error
- func (cx *Cronx) Start()
- func (cx *Cronx) Stop() context.Context
- type Entry
- type FuncJob
- type Job
- type JobMiddleware
- type Metadata
- type Option
- type TimerSchedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cronx ¶
type Cronx struct {
// contains filtered or unexported fields
}
func (*Cronx) AddTimerFunc ¶
func (*Cronx) AddTimerJob ¶
type Job ¶
func AttachMiddleware ¶
func AttachMiddleware(job Job, ms ...JobMiddleware) Job
type JobMiddleware ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func GetMetadata ¶
func NewMetadata ¶
type Option ¶
type Option func(*Cronx)
func WithCronOption ¶
func WithCronOption(opts ...cron.Option) Option
func WithMiddleware ¶
func WithMiddleware(m ...JobMiddleware) Option
type TimerSchedule ¶
type TimerSchedule struct {
// contains filtered or unexported fields
}
func NewTimerSchedule ¶
func NewTimerSchedule(t time.Time) *TimerSchedule
Click to show internal directories.
Click to hide internal directories.