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
//! 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`.
// Shared atomic-write primitive: barks, kv, overrides, shep.toml, dogs.toml
// and the muster roll all write through it.
// The lock a config file's writers hold across their read-modify-write, and
// the staging file they write through. Lives here rather than in shep-cli
// (where it was born) so shep-daemon can hold it too, once it starts writing
// `dogs.toml`.
// 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.
// OS-specific transport (unix socket or named pipe) lives here so nothing
// above it needs a `cfg`.
/// One-import surface for downstream crates