tuwunel_admin/server/
mod.rs1mod admin_notice;
2mod backup_database;
3mod clear_caches;
4mod list_backups;
5mod list_features;
6mod memory_usage;
7mod rebuild_relation_index;
8mod reload_config;
9mod reload_mods;
10#[cfg(unix)]
11mod restart;
12mod show_config;
13mod shutdown;
14mod uptime;
15
16use std::path::PathBuf;
17
18use clap::Subcommand;
19use tuwunel_core::Result;
20
21use crate::admin_command_dispatch;
22
23#[admin_command_dispatch]
24#[derive(Debug, Subcommand)]
25pub(super) enum ServerCommand {
26 Uptime,
28
29 ShowConfig,
31
32 ReloadConfig {
34 path: Option<PathBuf>,
35 },
36
37 ListFeatures {
39 #[arg(short, long)]
40 available: bool,
41
42 #[arg(short, long)]
43 enabled: bool,
44
45 #[arg(short, long)]
46 comma: bool,
47 },
48
49 MemoryUsage,
51
52 ClearCaches,
54
55 RebuildRelationIndex,
57
58 BackupDatabase,
61
62 ListBackups,
64
65 AdminNotice {
67 message: Vec<String>,
68 },
69
70 #[clap(alias = "reload")]
72 ReloadMods,
73
74 #[cfg(unix)]
75 Restart {
77 #[arg(short, long)]
78 force: bool,
79 },
80
81 Shutdown,
83}