Skip to main content

max / makenotwork

2.0 KB · 39 lines History Blame Raw
1 //! ops-core — shared infrastructure for operator tools (Sando, Bento).
2 //!
3 //! These are the genuinely domain-agnostic primitives that both the
4 //! tier-promotion deployer (Sando) and the app-release orchestrator (Bento)
5 //! need. Each tool keeps its own domain types (tiers/gates vs targets/steps),
6 //! recipes, and route handlers; only the transport-and-plumbing layer lives
7 //! here so there is exactly one copy.
8 //!
9 //! - [`remote`] — re-exported from the `ops-exec` crate: the streaming SSH (or
10 //! local) command primitive ([`remote::RemoteHost`]) and the
11 //! [`remote::LogSink`] sink trait. The capability-gated `Executor` trait and
12 //! its transports live in `ops-exec` proper (re-exported here as [`ops_exec`]).
13 //! - [`eventbus`] — a generic `EventEnvelope<E>` broadcast bus with flat-`kind`
14 //! serialization (each tool supplies its own concrete `Event` enum as `E`).
15 //! Split into a low-rate status channel and a high-rate log-chunk channel, so
16 //! a log firehose can't evict the status events an operator must not miss;
17 //! `E` classifies itself via [`eventbus::BusEvent`].
18 //! - [`live_log`] — a disk-append + callback live-log sink that implements
19 //! `LogSink`; parameterized over a chunk callback so it is not tied to any
20 //! tool's `Event` enum.
21 //! - [`daemon`] — small HTTP-daemon helpers both tools share verbatim (the
22 //! constant-time bearer-token compare).
23 //! - [`sqlite`] — connection helper (each tool runs its own `sqlx::migrate!`).
24 //!
25 //! Design: `ops-exec-overview` in the shared code wiki (`~/Code/_private/wiki/`).
26 //! <!-- wiki: ops-exec-overview -->
27
28 pub mod daemon;
29 pub mod eventbus;
30 pub mod live_log;
31 pub mod sqlite;
32
33 /// The trusted executor crate, re-exported so consumers can depend on
34 /// `ops-core` alone and get the `Executor` trait + transports transitively.
35 pub use ops_exec;
36 /// The low-level streaming primitive + `LogSink`, kept at the historical
37 /// `ops_core::remote` path so existing consumers compile unchanged.
38 pub use ops_exec::remote;
39