Skip to main content

kunobi_daemon/
lib.rs

1//! Shared lifecycle primitives for local background services.
2//!
3//! [`ProcessLock`] keeps a persistent lock inode across replacements.
4//! With the default `async` feature, `Lifecycle` closes request admission and
5//! waits for admitted work. `ensure_current` serializes upgrades through
6//! the caller's live health protocol. The caller owns service-manager commands,
7//! transport, version policy, and the treatment of unfinished work.
8
9#![cfg_attr(feature = "async", doc = include_str!("../README.md"))]
10
11#[cfg(feature = "launch")]
12pub mod launch;
13#[cfg(feature = "local")]
14#[allow(unsafe_code)]
15pub mod local;
16
17pub mod admission;
18mod candidate;
19#[cfg(feature = "wire-async")]
20pub mod control;
21mod identity;
22pub use candidate::Candidate;
23#[cfg(feature = "async")]
24pub mod generation;
25#[cfg(feature = "async")]
26mod lifecycle;
27pub mod observation;
28mod ownership;
29mod publication;
30pub mod readiness;
31pub mod replacement;
32pub mod retry;
33pub mod transport;
34pub mod warmup;
35pub use warmup::{warm_executable, warm_spawn, warm_spawn_until};
36#[cfg(feature = "async")]
37mod upgrade;
38
39pub use identity::{ServiceIdentity, ServicePaths};
40#[cfg(feature = "async")]
41pub use lifecycle::{DrainOutcome, Lifecycle, LifecycleSnapshot, RequestGuard};
42pub use ownership::ProcessLock;
43pub use publication::{RecordSlot, publish_record};
44#[cfg(feature = "async")]
45pub use upgrade::{UpgradeError, ensure_current};
46
47#[cfg(feature = "wire")]
48pub mod wire;