Versions in this module Expand all Collapse all v1 v1.0.0 Aug 5, 2026 Changes in this version + var ErrFull = errors.New("queue is full") + var ErrStopped = errors.New("queue is stopped") + func RegisterQueuePreload(v *vm.VM) + type Channel struct + func NewChannel(capacity int) *Channel + func (c *Channel) Cap() int + func (c *Channel) Close() + func (c *Channel) IsClosed() bool + func (c *Channel) Len() int + func (c *Channel) Receive(timeout time.Duration) (vm.Value, Result) + func (c *Channel) Send(v vm.Value, timeout time.Duration) Result + type Dispatcher struct + func NewDispatcher(capacity int) *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 struct + Args []vm.Value + Attempts int + Backoff time.Duration + Enqueued time.Time + Fn vm.Value + ID string + Payload vm.Value + Priority int64 + ReadyAt time.Time + Retries int + Timeout time.Duration + func (j *Job) Expired(now time.Time) bool + type Metrics struct + Dropped int64 + Enqueued int64 + Expired int64 + Failed int64 + MaxExec time.Duration + MaxWait time.Duration + Processed int64 + Retried int64 + Succeeded int64 + TotalExec time.Duration + TotalWait time.Duration + func (m Metrics) AvgExec() time.Duration + func (m Metrics) AvgWait() time.Duration + type Outcome int + const Failed + const Retried + const Succeeded + type Result int + const Closed + const OK + const Timeout + func (r Result) String() string Other modules containing this package github.com/hilthontt/luascript/v3