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

Function handle

kuma-cli/src/database.rs:18–35  ·  view source on GitHub ↗
(command: &Option<Command>, config: &Config, cli: &Cli)

Source from the content-addressed store, hash-verified

16}
17
18pub(crate) async fn handle(command: &Option<Command>, config: &Config, cli: &Cli) {
19 match command {
20 Some(Command::Size) => connect(config, cli)
21 .await
22 .get_database_size()
23 .await
24 .map(|size| json!({"size": size}))
25 .print_result(cli),
26
27 Some(Command::Shrink) => connect(config, cli)
28 .await
29 .shrink_database()
30 .await
31 .print_result(cli),
32
33 None => {}
34 }
35}

Callers

nothing calls this directly

Calls 4

connectFunction · 0.85
print_resultMethod · 0.80
get_database_sizeMethod · 0.80
shrink_databaseMethod · 0.80

Tested by

no test coverage detected