mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-04 20:37:43 +00:00
31 lines
798 B
Rust
31 lines
798 B
Rust
use clap::Parser;
|
|
use std::path::PathBuf;
|
|
|
|
/// Default port that a rustfs server listens on.
|
|
///
|
|
/// Used if no port is specified.
|
|
pub const DEFAULT_PORT: u16 = 9000;
|
|
|
|
#[derive(Debug, Parser)]
|
|
pub struct Opt {
|
|
/// DIR points to a directory on a filesystem.
|
|
#[arg(required = true)]
|
|
pub volumes: Vec<PathBuf>,
|
|
|
|
/// bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname
|
|
#[arg(long, default_value_t = format!(":{}", DEFAULT_PORT))]
|
|
pub address: String,
|
|
|
|
/// Access key used for authentication.
|
|
#[arg(long)]
|
|
pub access_key: Option<String>,
|
|
|
|
/// Secret key used for authentication.
|
|
#[arg(long)]
|
|
pub secret_key: Option<String>,
|
|
|
|
/// Domain name used for virtual-hosted-style requests.
|
|
#[arg(long)]
|
|
pub domain_name: Option<String>,
|
|
}
|