MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / main

Function main

kuma-cli/src/main.rs:18–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17#[tokio::main()]
18async fn main() {
19 let logger = Logger::try_with_env_or_str("info")
20 .unwrap()
21 .start()
22 .unwrap();
23
24 let cli = Cli::parse();
25 let config = Config::from(cli.clone());
26
27 match &cli.command {
28 Some(Commands::Monitor { command }) => monitor::handle(command, &config, &cli).await,
29 Some(Commands::Notification { command }) => {
30 notification::handle(command, &config, &cli).await
31 }
32 Some(Commands::Tag { command }) => tag::handle(command, &config, &cli).await,
33 Some(Commands::Maintenance { command }) => {
34 maintenance::handle(command, &config, &cli).await
35 }
36 Some(Commands::StatusPage { command }) => status_page::handle(command, &config, &cli).await,
37 Some(Commands::DockerHost { command }) => docker_host::handle(command, &config, &cli).await,
38 Some(Commands::Database { command }) => database::handle(command, &config, &cli).await,
39 Some(Commands::Login { command }) => login::handle(command, &config, &cli).await,
40 None if cli.shadow => kuma_client::build::print_build_in(),
41 None => {}
42 };
43
44 logger.shutdown();
45}

Callers

nothing calls this directly

Calls 2

handleFunction · 0.70
shutdownMethod · 0.45

Tested by

no test coverage detected