Controls the worker selected by stream.Janitor() or stream.Vacuum().
Janitor performs retention cleanup. Vacuum maintains the stream’s
idempotency-key table. Settings remain declared through StreamConfig.
Example
Inspect the janitor for the payments.requested stream using an initialized client.
Cancellation or its deadline interrupts the read or target update.
Operations
Operation
Effect
Suspend
Sets the instance target to zero. Prevents new claims and requests running work to stop at its next successful heartbeat. Returns without waiting for shutdown.
Unsuspend
Sets the instance target to one. A running manager can then claim the worker.
Status
Reads suspension, live claims, and recorded consecutive failures.
New streams start with an active janitor and suspended vacuum. Registering
stream configuration again preserves those targets.
Returns
Operation and condition
Return value
Suspend or Unsuspend succeeds
nil.
Status succeeds
(snapshot, nil).
Stream or worker is absent
The corresponding not-found error, with a nil snapshot for Status.