1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Shared foundation of the shep workspace
//!
//! Typed configuration (Flockfile + daemon config), value newtypes,
//! process selectors, `$SHEP_HOME` paths, and wire protocol version 1.
//! Every other crate depends on this one; it depends on no sibling.
//!
//! # Quick start
//! ```
//! use shep_core::prelude::*;
//!
//! let app: AppConfig = toml::from_str("name = \"web\"\nscript = \"./srv\"").unwrap();
//! assert!(app.autorestart);
//! let limit: MemSize = "512M".parse().unwrap();
//! assert_eq!(limit.bytes(), 512 << 20);
//! ```
//!
//! Module-by-module design: `docs/systematic-refactor/refactor-workspace/map.md`;
//! behavior contract: `docs/specs/shep-v1.md`.
// Declared above `barks`, `kv` and `overrides` because all three begin and
// end a write through it, as do `shep.toml`, `dogs.toml` and the muster
// roll in the crates above this one: one create-at-`0600` staging file and
// one definition of what finishes an atomic replace, rather than six
// writers each carrying their own copy and deciding how far to flush.
// The probe contract both sides of a dog's `--version`/`--schema` answer
// parse: flag names, the answer grammar, the schema's secret marker key.
// One definition of the log-line timestamp for the writer and every reader:
// the daemon stamps, and three different file readers in shep-cli strip.
// Declared next to `protocol`, deliberately: that module owns what travels
// over the control plane and this one owns what carries it. Keeping the two
// in one crate is what lets every layer above them — the client's actor, the
// daemon's connection state machine, every RPC verb — be written once with
// no `cfg` in it at all.
/// One-import surface for downstream crates