Expand description
Varta observer library — receive loop over configurable transport listeners, per-pid tracker, stall surface.
This crate is the in-process kernel of varta-watch. The binary
drives Observer::poll in a single thread and routes
Event values to exporters and the recovery command. The protocol root
is varta_vlp; nothing else is on the dependency surface.
Re-exports§
pub use clock::Clock;pub use clock::ClockError;pub use clock::ClockSource;pub use config::Config;pub use config::ConfigError;pub use exporter::Exporter;pub use exporter::FileExporter;pub use listener::BeatListener;pub use listener::PreThreadAttestation;pub use listener::TransportTrust;pub use listener::UdsListener;pub use observer::Event;pub use observer::Observer;pub use peer_cred::BeatOrigin;pub use recovery::Recovery;pub use recovery::RecoveryOutcome;pub use tracker::EvictionPolicy;pub use tracker::Slot;pub use tracker::Tracker;pub use tracker::Update;
Modules§
- audit
- Recovery audit log — TSV record of every recovery spawn/complete/refused.
- clock
- Configurable monotonic clock for stall-threshold accounting.
- config
- Hand-rolled GNU-style argv parser for the
varta-watchbinary. - exporter
- Exporters for
crate::observer::Eventstreams. - hw_
watchdog - Hardware watchdog driver for
varta-watch. - listener
- Transport abstraction for receiving VLP frames.
- log
- Structured logging for
varta-watch. - log_
ratelimit - Per-kind cooldown rate limiter for
varta-watchdiagnostic logging. - notify
- systemd
sd_notifyintegration forvarta-watch. - observer
- Single-threaded observer: bind one or more transport listeners, decode
incoming VLP frames, surface beats / stalls / decode errors via
Event. - peer_
cred - Kernel-level peer credential verification for Unix domain datagrams.
- pid_max
- Linux
/proc/sys/kernel/pid_maxreader for observer-side PID range gating. - recovery
- Per-pid debounced recovery command runner (non-blocking).
- signal_
install - Signal-handler installation for
varta-watch. - tracker
- Per-pid liveness tracker backed by a pre-allocated
Vec<Slot>plus a fixed-size, open-addressed [PidIndex] for O(1) pid lookup.
Macros§
- varta_
error - Emit an error-level message. No heap allocation.
- varta_
error_ err - Emit an error-level message with an associated error Display value. No heap allocation.
- varta_
error_ pid - Emit an error-level message with an associated PID and error Display. No heap allocation.
- varta_
error_ rl - Emit an error-level message with a 1-second per-kind cooldown.
- varta_
info - Emit an info-level message. Produces a JSON line (
json-log) or aeprintln!("varta-watch: ...")call (default). No heap allocation. - varta_
info_ pid - Emit an info-level message with an associated PID in the structured output. No heap allocation.
- varta_
info_ pid_ child - Emit an info-level message with an associated PID and child PID. No heap allocation.
- varta_
warn - Emit a warn-level message. No heap allocation.
- varta_
warn_ child - Emit a warn-level message with an associated child PID. No heap allocation.
- varta_
warn_ rl - Emit a warn-level message with a 1-second per-kind cooldown.