docs: add # Errors section to Coordinator::set_paused
This commit is contained in:
parent
20d8618624
commit
309adec07f
1 changed files with 7 additions and 0 deletions
|
|
@ -1471,6 +1471,13 @@ impl Coordinator {
|
||||||
/// directions: pausing an already-paused agent (or resuming a
|
/// directions: pausing an already-paused agent (or resuming a
|
||||||
/// running one) is a no-op rather than an error, so the dashboard
|
/// 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.
|
/// 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<()> {
|
pub fn set_paused(name: &hive_types::Ident, paused: bool) -> std::io::Result<()> {
|
||||||
let marker = Self::agent_paused_marker(name);
|
let marker = Self::agent_paused_marker(name);
|
||||||
if paused {
|
if paused {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue