docs: add # Errors section to Coordinator::set_paused

This commit is contained in:
atlas 2026-07-26 02:58:36 +02:00 committed by mara
commit 309adec07f

View file

@ -1471,6 +1471,13 @@ impl Coordinator {
/// directions: pausing an already-paused agent (or resuming a
/// running one) is a no-op rather than an error, so the dashboard
/// toggle and `hivectl pause|resume` don't have to read-then-write.
///
/// # Errors
///
/// Returns the underlying `io::Error` when the marker can't be
/// created (agent dir missing and un-creatable, permissions, disk
/// full) or can't be removed. A `NotFound` on removal is *not* an
/// error — that's the idempotent resume case.
pub fn set_paused(name: &hive_types::Ident, paused: bool) -> std::io::Result<()> {
let marker = Self::agent_paused_marker(name);
if paused {