diff --git a/src/config.rs b/src/config.rs index f1d862c54c1bc4d43f29a351bcf4b4c0b3fba492..78dbc02e494306e708c16193dd22ef409ad1e33c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -25,9 +25,21 @@ pub struct StorageOptions { #[structopt(long, env = "RUSTUS_DATA_DIR", default_value = "./data")] pub data_dir: PathBuf, + /// Storage directory structure. + /// This template shows inner directory structure. + /// You can use following variables: + /// day, month, year or even environment variables. + /// Example: "/year/month/day/env[HOSTNAME]/". + /// #[structopt(long, env = "RUSTUS_DIR_STRUCTURE", default_value = "")] pub dir_structure: String, + /// Forces fsync call after writing chunk to filesystem. + /// This parameter can help you when working with + /// Network file systems. It guarantees that + /// everything is written on disk correctly. + /// + /// In most cases this parameter is redundant. #[structopt(long, parse(from_flag))] pub force_fsync: bool, } @@ -112,6 +124,7 @@ pub struct NotificationsOptions { #[structopt(long, env = "RUSTUS_HOOKS_AMQP_EXCHANGE", default_value = "rustus")] pub hooks_amqp_exchange: String, + /// Prefix for all AMQP queues. #[cfg(feature = "amqp_notifier")] #[structopt( long, @@ -120,9 +133,13 @@ pub struct NotificationsOptions { )] pub hooks_amqp_queues_prefix: String, + /// Directory for executable hook files. + /// This parameter is used to call executables from dir. #[structopt(long, env = "RUSTUS_HOOKS_DIR")] pub hooks_dir: Option<PathBuf>, + /// Executable file which must be called for + /// notifying about upload status. #[structopt(long, env = "RUSTUS_HOOKS_FILE")] pub hooks_file: Option<String>, }