Versions in this module Expand all Collapse all v0 v0.10.1 Nov 12, 2026 Changes in this version + const MaxCost + const MaxQuantum + var ErrCostTooLarge = errors.New("dwrr: item cost exceeds MaxCost") + var ErrQuantumTooLarge = errors.New("dwrr: quantum exceeds MaxQuantum") + var ErrZeroCost = errors.New("dwrr: item cost must be positive") + var ErrZeroQuantum = errors.New("dwrr: quantum must be positive") + type DWRR struct + func NewDWRR[T any](count uint) *DWRR[T] + func (d *DWRR[T]) AddQueue() uint + func (d *DWRR[T]) DrainQueue(queue uint) []Item[T] + func (d *DWRR[T]) Enqueue(queue uint, items []Item[T]) error + func (d *DWRR[T]) RemoveHead(queue uint) (Item[T], bool) + func (d *DWRR[T]) RemoveQueue() + func (d *DWRR[T]) SetQuantum(queue uint, quantum uint64) error + func (d *DWRR[T]) Take(n int) []Scheduled[T] + type Item struct + Cost uint64 + Value T + type Scheduled struct + Cost uint64 + Queue uint + Value T