Skip to content

Commit

Permalink
Version 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesdejager committed Apr 25, 2020
1 parent 32d39fd commit 66f5203
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "unftp"
version = "0.8.4"
version = "0.9.0"
authors = [
"Agoston Horvath <[email protected]>",
"Dávid Kosztka <[email protected]>",
Expand All @@ -18,7 +18,7 @@ readme = "README.md"

[dependencies]
async-trait = "0.1.30"
libunftp = { git="https://github.com/bolcom/libunftp", branch="master" }
libunftp = "0.10.0"
log = "0.4"
env_logger = "0.6"
redis = "0.9.0"
Expand Down
8 changes: 4 additions & 4 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ pub const FTPS_CERTS_FILE: &str = "ftps-certs-file";
pub const FTPS_CERTS_PASSWORD: &str = "ftps-certs-password";
pub const GCS_BUCKET: &str = "sbe-gcs-bucket";
pub const GCS_KEY_FILE: &str = "sbe-gcs-key-file";
pub const HTTP_BIND_ADDR: &str = "bind-address-http";
pub const HTTP_BIND_ADDRESS: &str = "bind-address-http";
pub const IDLE_SESSION_TIMEOUT: &str = "idle-session-timeout";
pub const PASSIVE_PORTS: &str = "passive-ports";
pub const PROXY_EXTERNAL_CONTROL_ADDRES: &str = "proxy-external-control-address";
pub const PROXY_EXTERNAL_CONTROL_ADDRESS: &str = "proxy-external-control-address";
pub const REDIS_HOST: &str = "log-redis-host";
pub const REDIS_KEY: &str = "log-redis-key";
pub const REDIS_PORT: &str = "log-redis-port";
Expand Down Expand Up @@ -116,7 +116,7 @@ pub(crate) fn clap_app(tmp_dir: &str) -> clap::App {
.takes_value(true),
)
.arg(
Arg::with_name(HTTP_BIND_ADDR)
Arg::with_name(HTTP_BIND_ADDRESS)
.long("bind-address-http")
.value_name("HOST_PORT")
.help("Sets the host and port for the HTTP server used by prometheus metrics collection")
Expand Down Expand Up @@ -237,7 +237,7 @@ pub(crate) fn clap_app(tmp_dir: &str) -> clap::App {
.default_value("600"),
)
.arg(
Arg::with_name(PROXY_EXTERNAL_CONTROL_ADDRES)
Arg::with_name(PROXY_EXTERNAL_CONTROL_ADDRESS)
.long("proxy-external-control-address")
.value_name("HOST_PORT")
.help("This switches on proxy protocol mode and sets the external IP and external control port number for example 10.0.0.1:2121.")
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ where
.metrics();

// Setup proxy protocol mode.
if let Some(addr) = arg_matches.value_of(args::PROXY_EXTERNAL_CONTROL_ADDRES) {
if let Some(addr) = arg_matches.value_of(args::PROXY_EXTERNAL_CONTROL_ADDRESS) {
let addr: SocketAddr = String::from(addr).parse().map_err(|e| {
format!(
"unable to parse proxy protocol external control port address {}: {}",
Expand Down Expand Up @@ -330,7 +330,7 @@ async fn start_http(log: &Logger, bind_addr: &str) -> Result<(), String> {
}

async fn main_task(arg_matches: ArgMatches<'_>, log: &Logger) -> Result<(), String> {
if let Some(addr) = arg_matches.value_of(args::HTTP_BIND_ADDR) {
if let Some(addr) = arg_matches.value_of(args::HTTP_BIND_ADDRESS) {
let addr = String::from(addr);
let log = log.clone();
tokio::spawn(async move {
Expand Down

0 comments on commit 66f5203

Please sign in to comment.