Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Sep 14, 2022
1 parent 976a4c7 commit 6df9ffb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
13 changes: 4 additions & 9 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::Config;
pub use self::{
generate_config_schema::GenerateConfigSchema,
manage::{Manage, Providers},
run::Run
run::Run,
};

const VERSION: &str = env!("CARGO_PKG_VERSION");
Expand All @@ -41,18 +41,13 @@ const ETC_CONFIG_PATH: &str = "/etc/quilkin/quilkin.yaml";
#[non_exhaustive]
pub struct Cli {
/// The path to the configuration file for the Quilkin instance.
#[clap(
short,
long,
env = "QUILKIN_CONFIG",
default_value = "quilkin.yaml",
)]
#[clap(short, long, env = "QUILKIN_CONFIG", default_value = "quilkin.yaml")]
pub config: PathBuf,
/// The port to bind for the admin server
#[clap(long, env="QUILKIN_ADMIN_ADDRESS")]
#[clap(long, env = "QUILKIN_ADMIN_ADDRESS")]
pub admin_address: Option<std::net::SocketAddr>,
/// Whether to spawn the admin server or not.
#[clap(long, env="QUILKIN_NO_ADMIN")]
#[clap(long, env = "QUILKIN_NO_ADMIN")]
pub no_admin: bool,
/// Whether Quilkin will report any results to stdout/stderr.
#[clap(short, long, env)]
Expand Down
12 changes: 2 additions & 10 deletions src/cli/manage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,10 @@ pub enum Providers {
/// and for a `ConfigMap` that specifies the filter configuration.
Agones {
/// The namespace under which the configmap is stored.
#[clap(
short,
long,
default_value = "default",
)]
#[clap(short, long, default_value = "default")]
config_namespace: String,
/// The namespace under which the game servers run.
#[clap(
short,
long,
default_value = "default",
)]
#[clap(short, long, default_value = "default")]
gameservers_namespace: String,
},

Expand Down
9 changes: 2 additions & 7 deletions src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,15 @@ pub struct Run {
#[clap(short, long, env = "QUILKIN_PORT")]
pub port: Option<u16>,
/// One or more socket addresses to forward packets to.
#[clap(
short,
long,
env = "QUILKIN_DEST",
required(true),
)]
#[clap(short, long, env = "QUILKIN_DEST", required(true))]
pub to: Vec<SocketAddr>,
/// One or more `quilkin manage` endpoints to listen to for config changes
#[clap(
short,
long,
env = "QUILKIN_MANAGEMENT_SERVER",
required(true),
conflicts_with("to"),
conflicts_with("to")
)]
pub management_server: Vec<String>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

mod admin;
mod cluster;
mod proxy;
pub(crate) mod metrics;
pub(crate) mod prost;
mod proxy;
pub(crate) mod ttl_map;
pub(crate) mod utils;

Expand Down

0 comments on commit 6df9ffb

Please sign in to comment.