MCPcopy Create free account
hub / github.com/aws/clock-bound / main

Function main

clock-bound/src/bin/clockbound.rs:17–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16/// Exit code for a bad configuration, distinct from a runtime crash.
17const CONFIG_ERROR_EXIT: u8 = 2;
18
19#[derive(Debug, Parser)]
20struct Args {
21 /// Path to the configuration file. Without one the daemon runs on defaults
22 #[clap(short, long)]
23 configuration: Option<PathBuf>,
24
25 /// Raise the stdout level from `info` to `debug`.
26 #[clap(short, long)]
27 verbose: bool,
28
29 /// Load, parse, and validate the configuration, report the outcome, and exit without
30 /// starting the daemon.
31 #[clap(long, requires = "configuration")]
32 check_configuration: bool,
33}
34
35#[tokio::main(flavor = "multi_thread", worker_threads = 4)]
36async fn main() {
37 let args = Args::parse();
38
39 // Load and validate the configuration before anything is set up, so a bad one
40 // reports its cause and stops here.

Callers

nothing calls this directly

Calls 4

initFunction · 0.85
parseFunction · 0.50
newFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected