Files
continuwuity/src/admin/server/mod.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.1 KiB
Rust
Raw Normal View History

mod commands;
2025-01-24 07:04:29 +00:00
use std::path::PathBuf;
use clap::Subcommand;
2024-12-14 21:58:01 -05:00
use conduwuit::Result;
2024-07-27 00:11:41 +00:00
use crate::admin_command_dispatch;
2024-07-27 00:11:41 +00:00
#[admin_command_dispatch]
#[derive(Debug, Subcommand)]
2025-05-24 00:28:09 +01:00
pub enum ServerCommand {
2024-04-26 18:55:45 -07:00
/// - Time elapsed since startup
Uptime,
/// - Show configuration values
ShowConfig,
2025-01-24 07:04:29 +00:00
/// - Reload configuration values
ReloadConfig {
path: Option<PathBuf>,
},
2024-07-24 23:53:48 +00:00
/// - List the features built into the server
ListFeatures {
#[arg(short, long)]
available: bool,
#[arg(short, long)]
enabled: bool,
#[arg(short, long)]
comma: bool,
},
/// - Print database memory usage statistics
MemoryUsage,
2025-04-22 07:56:42 -05:00
/// - Clears all of Continuwuity's caches
2024-07-04 03:26:19 +00:00
ClearCaches,
/// - Performs an online backup of the database (only available for RocksDB
/// at the moment)
BackupDatabase,
/// - List database backups
ListBackups,
2024-06-16 02:10:47 +00:00
/// - Send a message to the admin room.
AdminNotice {
message: Vec<String>,
},
2024-06-16 01:44:41 +00:00
/// - Hot-reload the server
2024-07-27 00:11:41 +00:00
#[clap(alias = "reload")]
ReloadMods,
2024-06-16 01:44:41 +00:00
2024-06-16 19:46:32 +00:00
#[cfg(unix)]
/// - Restart the server
2024-07-03 04:46:50 +00:00
Restart {
#[arg(short, long)]
force: bool,
},
2024-06-16 19:46:32 +00:00
2024-06-16 01:44:41 +00:00
/// - Shutdown the server
Shutdown,
}