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.

64 lines
1.0 KiB
Rust
Raw Normal View History

mod commands;
use clap::Subcommand;
use conduit::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)]
pub(super) enum ServerCommand {
2024-04-26 18:55:45 -07:00
/// - Time elapsed since startup
Uptime,
/// - Show configuration values
ShowConfig,
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,
2024-07-04 03:26:19 +00:00
/// - Clears all of Conduwuit's caches
ClearCaches,
/// - Performs an online backup of the database (only available for RocksDB
/// at the moment)
BackupDatabase,
/// - List database backups
ListBackups,
/// - List database files
ListDatabaseFiles,
2024-06-16 01:44:41 +00:00
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,
}