Documentation
¶
Index ¶
- Variables
- func RegisterQueuePreload(v *vm.VM)
- type Channel
- type Dispatcher
- func (d *Dispatcher) Clear() int
- func (d *Dispatcher) Complete(j *Job, failed bool, wait, exec time.Duration) Outcome
- func (d *Dispatcher) Len() int
- func (d *Dispatcher) MarkExpired()
- func (d *Dispatcher) NextDue(now time.Time) (j *Job, wait time.Duration, ok bool)
- func (d *Dispatcher) Snapshot() Metrics
- func (d *Dispatcher) Stop()
- func (d *Dispatcher) Stopped() bool
- func (d *Dispatcher) Submit(j *Job) error
- func (d *Dispatcher) Wake() <-chan struct{}
- type Job
- type Metrics
- type Outcome
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFull = errors.New("queue is full") ErrStopped = errors.New("queue is stopped") )
Functions ¶
func RegisterQueuePreload ¶
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(capacity int) *Dispatcher
func (*Dispatcher) Clear ¶
func (d *Dispatcher) Clear() int
func (*Dispatcher) Len ¶
func (d *Dispatcher) Len() int
func (*Dispatcher) MarkExpired ¶
func (d *Dispatcher) MarkExpired()
func (*Dispatcher) Snapshot ¶
func (d *Dispatcher) Snapshot() Metrics
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
func (*Dispatcher) Stopped ¶
func (d *Dispatcher) Stopped() bool
func (*Dispatcher) Submit ¶
func (d *Dispatcher) Submit(j *Job) error
func (*Dispatcher) Wake ¶
func (d *Dispatcher) Wake() <-chan struct{}
type Job ¶
Click to show internal directories.
Click to hide internal directories.