swarm-queue-based lifecycle notices, replacing push_todo(MANAGER_AGENT)

This commit is contained in:
damocles 2026-08-16 15:58:45 +02:00 committed by mara
commit e44ea9d8d4
12 changed files with 388 additions and 142 deletions

View file

@ -115,6 +115,14 @@ pub enum Error {
#[source]
source: async_nats::jetstream::context::CreateKeyValueError,
},
#[cfg(feature = "notices")]
#[error("creating the {stream} stream")]
CreateStream {
stream: &'static str,
#[source]
source: async_nats::jetstream::context::CreateStreamError,
},
}
/// Render an error and its source chain on one line.
@ -165,6 +173,12 @@ pub mod status;
/// permitted at all — speaks neither `jetstream` nor `kv`.
pub const KNOWLEDGE_SUBJECT: &str = "$SWARM.knowledge";
/// The hive-notices stream, shared by the hive that publishes and
/// whatever eventually consumes it. Behind the `notices` feature, same
/// reason `status` is behind `kv` — see the module doc.
#[cfg(feature = "notices")]
pub mod notices;
/// Only the fields this needs; authelia returns several.
#[derive(serde::Deserialize)]
struct TokenResponse {