Skip to main content

Crate zenkey_fleet

Crate zenkey_fleet 

Source
Expand description

Fleet engine for keyspace-v2 tooling (issue #15).

The shared core of zenctl and zengui: everything a bus explorer needs that is not presentation. The RFC 05 §2.1 fan-in discipline lives in exactly one place (query::fleet_get, moved verbatim from zenctl — target All, consolidation None, attribution by the reply’s own key); the liveliness roster, registry-slice sets, and the schema-aware decode seam build on it.

Sessions opened here are deliberately un-namespaced (RFC 09 §5): an explorer sees the wire as it really is, full keys included — that is what lets it spot a leak. Do not “fix” this by setting a namespace.

Re-exports§

pub use body::BodySource;
pub use body::PrepareMode;
pub use body::PreparedBody;
pub use body::encode_encoding;
pub use body::prepare_publish;
pub use body::prepare_request;
pub use decode::SchemaDrift;
pub use decode::TotalityGap;
pub use decode::schema_drift;
pub use decode::schema_dump;
pub use decode::schemas_for_type;
pub use decode::totality_gaps;
pub use doctor::CHECK_IDS;
pub use doctor::DoctorSpec;
pub use doctor::run_doctor;
pub use admin::AdminEntry;
pub use admin::Coverage;
pub use admin::CoverageRow;
pub use admin::RouterInfo;
pub use admin::StorageInfo;
pub use admin::admin_get;
pub use admin::routers;
pub use admin::state_coverage;
pub use admin::storages;
pub use admin::DeclaredEntities;
pub use admin::DeclaredEntity;
pub use admin::EntityKind;
pub use admin::declared_entities;
pub use admin::OriginAttachment;
pub use admin::TopologyEdge;
pub use admin::TopologyNode;
pub use admin::TopologyReport;
pub use admin::origin_attachments;
pub use admin::topology;
pub use bench::BenchSpec;
pub use bench::bench_rpc;
pub use blob::BlobTarget;
pub use blob::blob_list;
pub use blob::declared_by;
pub use context_store::StoredContext;
pub use context_store::active_name;
pub use context_store::cache_dir;
pub use diff::ByteDiff;
pub use diff::Change;
pub use diff::ValueDiff;
pub use diff::byte_diff;
pub use discover::AliveToken;
pub use discover::DiscoveredBase;
pub use discover::discover_bases;
pub use facts::FactsCache;
pub use facts::KeyDescription;
pub use facts::KeyFacts;
pub use facts::KeyShape;
pub use facts::Registration;
pub use facts::describe_key;
pub use ingest::IngestRow;
pub use ingest::parse_row;
pub use query::Answer;
pub use query::FetchOutcome;
pub use query::FetchSpec;
pub use query::FetchedValue;
pub use query::FleetAnswer;
pub use query::RepeatingQuery;
pub use query::RepeatingRegistry;
pub use query::StateSample;
pub use query::ValueSource;
pub use query::declare_repeating;
pub use query::declare_repeating_any;
pub use query::fetch_value;
pub use query::fleet_get;
pub use query::fleet_get_at;
pub use query::fleet_get_call;
pub use query::fleet_registry;
pub use query::state_snapshot;
pub use record::RecordBounds;
pub use record::RecordReport;
pub use record::ReplayEvent;
pub use record::ReplayReport;
pub use record::ReplayTarget;
pub use record::ZREC_VERSION;
pub use record::ZrecHeader;
pub use record::ZrecItem;
pub use record::ZrecReader;
pub use record::ZrecWriter;
pub use record::record;
pub use record::replay;
pub use registry::SliceSet;
pub use roster::BridgeMatch;
pub use roster::Freshness;
pub use roster::NodeInfo;
pub use roster::ProducerInfo;
pub use roster::bridge_resolve;
pub use roster::node_info;
pub use roster::roster;
pub use scout::HelloView;
pub use scout::ScoutStream;
pub use scout::scout;
pub use seed::SeedCoverage;
pub use seed::SeedItem;
pub use seed::SeedPolicy;
pub use seed::SeededSubscriber;
pub use seed::seed_subscribe;
pub use serve::MockResponder;
pub use serve::ServedQuery;
pub use serve::declare_responder;
pub use session::open;
pub use session::open_with_config;
pub use skeleton::MergedNode;
pub use skeleton::NodeStatus;
pub use skeleton::Skeleton;
pub use stats::LatencySummary;
pub use sub::EventStream;
pub use sub::FleetEvent;
pub use sub::Monitor;
pub use sub::MonitorCore;
pub use sub::MonitorSpec;
pub use sub::SampleSource;
pub use sub::SampleView;
pub use sub::StreamItem;
pub use sub::WatchId;
pub use tree::KeyTreeSnapshot;
pub use write::CallTarget;
pub use write::MatchingEvents;
pub use write::Publication;
pub use write::RetireClass;
pub use write::call;
pub use write::check_retire;
pub use write::declare_publication;

Modules§

admin
Zenoh admin-space access (issue #14): browse @/** — the middleware’s own introspection — from the same un-namespaced session the convention tooling already holds (a namespaced session’s admin selector would be rewritten and match nothing, RFC 09 §5).
bench
bench rpc (issue #52) — how fast does the fleet answer, and which origin is slow.
blob
The @blob plane, as an explorer sees it (RFC 07 §2; issues #58, #68).
body
Preparing a body for the wire (issue #97) — the encode half of the codec seam, on the path a write actually takes.
context_store
Named connection contexts — the store shared by every explorer (issue #35).
decode
The schema-aware decode seam (issues #11/#15): wire key → type name → served schema → named-field JSON, with the honest fallbacks a generic tool owes its user.
diff
Payload diff (issue #63): what changed between two consecutive values of one key.
discover
Deployment-base discovery — the sweep behind zenctl base list.
doctor
The doctor checks as engine functions (#55): every finding both frontends render comes from here — zenctl doctor orchestrates and renders, the zengui doctor panel calls the same run_doctor and renders the same DoctorReport. A check that lives in one frontend is a check the other frontend’s user never sees (RFC 08 §6.1’s argument, applied to ourselves).
facts
What an explorer can honestly say about one observed key (RFC 09 §5.1).
ingest
Reading back the row shape the explorers emit (#125): one schema, both directions.
query
The fan-in query discipline (RFC 05 §2.1) — moved verbatim from zenctl’s bus.rs; this stays the single chokepoint for fleet GETs.
record
.zrec capture and replay (issue #39; RFC 09 §5.2 documents the etiquette, this module is normative for the format).
registry
Registry-slice sets (RFC 08 §6): one type over both sources.
report
Typed reports — the shared contract between the engine and every frontend.
roster
The liveliness roster (RFC 04 §5).
scout
Raw scouting: the Hello layer, below sessions and liveliness (#116).
seed
Correct state seeding — RFC 04 §3.2 as an engine helper (issue #42; the repo’s old #20).
serve
A mock responder for the dev loop (#121): stand up a queryable so a consumer can be tested — the explorers could ask and observe but never answer.
session
Session setup for un-namespaced observers (RFC 09 §5).
skeleton
The declared keyspace, built without subscribing to anything (issue #84).
stats
Windowed per-key statistics (issues #13/#15): message/byte counters and an exponentially-weighted rate, keyed by wire key. Backs zenctl topic hz/bw/echo --rate and zengui’s tree badges.
sub
The live monitor (issue #15): subscription multiplexing + liveliness watching, fanned into a bounded broadcast of FleetEvents, with the key-tree snapshot published on a stats tick.
tree
The live key tree (issue #15): an immutable snapshot of everything the monitor has seen, grouped by key chunks, with per-node statistics.
write
The write facade (issue #36): the only two ways an explorer writes to the bus — a declared publication, and a disciplined RPC call.