mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-05-13 22:43:07 +00:00
cb79a3b9d7
It's cursed and not very useful. Still a few uses of ctor left, but oh well.
56 lines
920 B
Rust
56 lines
920 B
Rust
mod commands;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
use clap::Subcommand;
|
|
use conduwuit::Result;
|
|
|
|
use crate::admin_command_dispatch;
|
|
|
|
#[admin_command_dispatch]
|
|
#[derive(Debug, Subcommand)]
|
|
pub enum ServerCommand {
|
|
/// Time elapsed since startup
|
|
Uptime,
|
|
|
|
/// Show configuration values
|
|
ShowConfig,
|
|
|
|
/// Reload configuration values
|
|
ReloadConfig {
|
|
path: Option<PathBuf>,
|
|
},
|
|
|
|
/// Print database memory usage statistics
|
|
MemoryUsage,
|
|
|
|
/// Clears all of Continuwuity's caches
|
|
ClearCaches,
|
|
|
|
/// Performs an online backup of the database (only available for RocksDB
|
|
/// at the moment)
|
|
BackupDatabase,
|
|
|
|
/// List database backups
|
|
ListBackups,
|
|
|
|
/// Send a message to the admin room.
|
|
AdminNotice {
|
|
message: Vec<String>,
|
|
},
|
|
|
|
/// Hot-reload the server
|
|
#[clap(alias = "reload")]
|
|
ReloadMods,
|
|
|
|
#[cfg(unix)]
|
|
/// Restart the server
|
|
Restart {
|
|
#[arg(short, long)]
|
|
force: bool,
|
|
},
|
|
|
|
/// Shutdown the server
|
|
Shutdown,
|
|
}
|