Versions in this module Expand all Collapse all v1 v1.3.0 Dec 10, 2020 Changes in this version + const DefaultMaxCFSize + const TestMaxCFSize + var ErrJobOutOfSpokeBounds = errors.New("The offered job is outside the bounds of this spoke ") + func NextID() uint64 + type Hub struct + func NewHub(opts *HubOpts) *Hub + func (h *Hub) AddJobLocked(j *Job) error + func (h *Hub) CancelJobLocked(jobID string) (*Job, error) + func (h *Hub) GetNJobs(n int) chan *Job + func (h *Hub) NextLocked() *Job + func (h *Hub) PersistLocked() chan error + func (h *Hub) Prune() int + func (h *Hub) Restore() error + func (h *Hub) Stats() stats.Snapshot + func (h *Hub) StatusLocked() + func (h *Hub) StatusPrinter() + func (h *Hub) Stop(persist bool) + type HubOpts struct + AttemptRestore bool + MaxCFSize uint + Persister persistence.Persister + SpokeSpan time.Duration + type Job struct + func NewJob(id string, triggerAt time.Time, b []byte) *Job + func NewJobAutoID(triggerAt time.Time, b []byte) *Job + func (j *Job) AsBound(spokeSpan time.Duration) temporal.Bound + func (j *Job) AsPriorityItem() *queue.Item + func (j *Job) AsTemporalState() temporal.State + func (j *Job) Body() []byte + func (j *Job) GobDecode(data []byte) error + func (j *Job) GobEncode() (data []byte, err error) + func (j *Job) ID() string + func (j *Job) IsReady() bool + func (j *Job) SetOpts(pri int32, ttr time.Duration) + func (j *Job) SizeOf() uint64 + func (j *Job) TriggerAt() time.Time + type Spoke struct + func NewSpoke(start, end time.Time) *Spoke + func NewSpokeFromNow(duration time.Duration) *Spoke + func (s *Spoke) AddJobLocked(j *Job) error + func (s *Spoke) AsPriorityItem() *queue.Item + func (s *Spoke) AsTemporalState() temporal.State + func (s *Spoke) CancelJobLocked(id string) (*Job, error) + func (s *Spoke) GetLocker() sync.Locker + func (s *Spoke) ID() uuid.UUID + func (s *Spoke) IsJobInBounds(j *Job) bool + func (s *Spoke) JobAtIdx(i int) *Job + func (s *Spoke) Lock() + func (s *Spoke) NextLocked() *Job + func (s *Spoke) OwnsJobLocked(id string) bool + func (s *Spoke) PendingJobsLen() int + func (s *Spoke) PersistLocked(p persistence.Persister) chan error + func (s *Spoke) Unlock()