Documentation ¶
Index ¶
- type Job
- type Runner
- type Scheduler
- func (scheduler *Scheduler) Delete(subreddit string)
- func (scheduler *Scheduler) Get(subreddit string) *Job
- func (scheduler *Scheduler) Iter(f func(string, *Job) bool)
- func (scheduler *Scheduler) List() map[string]*Job
- func (scheduler *Scheduler) Put(subreddit string, schedule string) (job *Job, err error)
- func (s *Scheduler) Start()
- func (s *Scheduler) Stop()
- func (scheduler *Scheduler) Sync(ctx context.Context, db bob.Executor) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func (*Scheduler) Delete ¶
Delete removes a job from the scheduler.
If job does not exist, it will be a no-op.
func (*Scheduler) Get ¶
Get returns the job for the given subreddit.
Returns nil if the subreddit is not found or active.
func (*Scheduler) Put ¶
Put adds a job to the scheduler.
If job already exists, it will be replaced.
Click to show internal directories.
Click to hide internal directories.