1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-14 11:57:30 +00:00

server: Add --mode check-config

This commit is contained in:
Zhaofeng Li 2023-01-01 20:59:02 -07:00
parent a3636339e0
commit 0c1f362a62

View file

@ -44,6 +44,9 @@ enum ServerMode {
/// Run garbage collection then exit.
GarbageCollectorOnce,
/// Check the configuration then exit.
CheckConfig,
}
#[tokio::main]
@ -95,6 +98,9 @@ async fn main() -> Result<()> {
ServerMode::GarbageCollectorOnce => {
attic_server::gc::run_garbage_collection_once(config).await?;
}
ServerMode::CheckConfig => {
// config is valid, let's just exit :)
}
}
Ok(())