Expand description
Shared drain-marker helpers.
The drain marker is a file next to the engine WAL that signals the API to
keep refusing traffic across a restart. These helpers are pure (path / fs /
atomic) so both the hypercall-api readiness path and the admin lifecycle
surface use the same implementation. State-coupled quiesce orchestration
lives with each caller, since it operates on caller-specific channels.
Functionsยง
- drain_
marker_ path - Path to the drain marker file, derived from the engine WAL path.
- keep_
drain_ after_ accepted_ quiesce_ failure - Keep the API drained and persist the marker when a quiesce request was accepted but its outcome is unknown, so a restart stays safe.
- persist_
drain_ marker - Persist the drain marker so a restart resumes in the drained state.