Documentation
¶
Overview ¶
Package lease implements the worker side of the work-lease protocol: it keeps exactly one outstanding lease request per queue and dispatches each assignment the server returns. The server gates capacity, so the worker simply runs what it is given. Replaces the JetStream pull loop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
QueueIDs []string // queues this worker serves (at least one)
RequestTimeout time.Duration // long-poll request timeout; default 35s
WorkerID string // included in each request
}
Config tunes the lease loop.
type Dispatcher ¶
Dispatcher executes one assignment.
Click to show internal directories.
Click to hide internal directories.