max / makenotwork
| 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 | //! - [`base_image`] — what a machine IS, declared in the topology and checked |
| 22 | //! against the machine before a build or a deploy runs there. |
| 23 | //! - [`daemon`] — small HTTP-daemon helpers both tools share verbatim (the |
| 24 | //! constant-time bearer-token compare). |
| 25 | //! - [`sqlite`] — connection helper (each tool runs its own `sqlx::migrate!`). |
| 26 | //! |
| 27 | //! Design: `ops-exec-overview` in the shared code wiki (`~/Code/_private/wiki/`). |
| 28 | //! <!-- wiki: ops-exec-overview --> |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | /// The trusted executor crate, re-exported so consumers can depend on |
| 37 | /// `ops-core` alone and get the `Executor` trait + transports transitively. |
| 38 | pub use ops_exec; |
| 39 | /// The low-level streaming primitive + `LogSink`, re-exported at |
| 40 | /// `ops_core::remote`. |
| 41 | pub use remote; |
| 42 |