Skip to main content

zenkey_fleet/report/
discover.rs

1//! The discovery plane: a deployment base seen on the wire, and how it was
2//! seen.
3//!
4//! Un-namespaced observation is the whole point (RFC 09 §5): an explorer
5//! that had set a namespace could not have found any base but its own.
6
7use std::collections::BTreeSet;
8
9use serde::Serialize;
10
11/// One discovered base and the evidence for it.
12#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize)]
13pub struct DiscoveredBase {
14    /// `""` is the empty base (keys start at `v1/` on the wire).
15    pub base: String,
16    /// Origins holding alive tokens under this base.
17    pub origins: BTreeSet<String>,
18    /// Producer names alive under this base.
19    pub producers: BTreeSet<String>,
20    /// Storages whose config names this base, as `name@zid`.
21    pub storages: Vec<String>,
22}