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
//! `greggd` library.
//!
//! Provides the daemon components: configuration, service management,
//! metrics collection, periodic sampling, and HTTP server.
/// CLI argument parsing and subcommand dispatch for the daemon.
/// Native metrics collection for each supported platform.
/// Daemon configuration, validation, file I/O, and atomic persistence.
/// Local Unix-domain control socket for `greggd stop`.
/// Local-network address resolution utilities.
/// Foreground daemon entry point and shutdown orchestration.
/// Periodic sampling loop that collects metrics and manages daemon state.
/// HTTP server for the daemon status and health endpoints.
/// Windows Service Control Manager integration.
///
/// Compiled on Windows and, for unit tests, on every platform so the
/// injectable SCM fake-adapter tests run deterministically without a
/// Windows host. Production SCM types stay Windows-only inside.
/// Startup installation and restart helpers.
/// Read-only local diagnostic status composing config, version, health, and startup state.
/// Component-safe uninstall.
/// Binary-first self-update.