Versions in this module Expand all Collapse all v5 v5.0.1 Jul 28, 2026 Changes in this version + const DefaultQueueLimit + const HealthDead + const HealthDegraded + const HealthReady + const HealthRestarting + var ErrNoReadyWorker = errors.New("compute: no ready worker is available") + var ErrQueueFull = errors.New("compute: the job queue is at its limit") + type Assignment struct + Job Job + WorkerID WorkerID + type Job struct + ID JobID + Kind string + Payload []byte + type JobID string + type Options struct + MaxInFlightPerWorker int + QueueLimit int + type Pool struct + func NewPool(parseWorkerIDs []WorkerID, parseOptions Options) (*Pool, error) + func (parsePool *Pool) Complete(parseJobID JobID) bool + func (parsePool *Pool) Degraded() bool + func (parsePool *Pool) Dispatch() []Assignment + func (parsePool *Pool) InFlight() int + func (parsePool *Pool) QueueDepth() int + func (parsePool *Pool) ReadyWorkers() []WorkerID + func (parsePool *Pool) RecordHeartbeat(parseWorkerID WorkerID, parseSequence uint64) error + func (parsePool *Pool) RecordHeartbeatTimeout(parseWorkerID WorkerID) (WorkerHealth, error) + func (parsePool *Pool) RestartWorker(parseDeadWorkerID WorkerID, parseReplacementWorkerID WorkerID) (int, error) + func (parsePool *Pool) SetWorkerHealth(parseWorkerID WorkerID, parseHealth WorkerHealth) error + func (parsePool *Pool) Submit(parseJob Job) error + type WorkerHealth = services.WorkerHealth + type WorkerID = services.WorkerID