Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
added support for WASH_RPC_HOST, _TIMEOUT, and _PORT in wash ctl (#64)
Browse files Browse the repository at this point in the history
bumped nkeys to fix build
  • Loading branch information
jsoverson authored Jan 27, 2021
1 parent 47b4b41 commit 0b9cb11
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spinners = "1.2.0"
nats = "0.8.6"
once_cell = "1.5.2"

nkeys = "0.0.11"
nkeys = "0.0.12"
wascap = "0.5.1"
term-table = "1.3.0"
provider-archive = "0.3.1"
Expand Down
21 changes: 18 additions & 3 deletions src/ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,34 @@ impl CtlCli {
#[derive(Debug, Clone, StructOpt)]
pub(crate) struct ConnectionOpts {
/// RPC Host for connection, defaults to 0.0.0.0 for local nats
#[structopt(short = "r", long = "rpc-host", default_value = "0.0.0.0")]
#[structopt(
short = "r",
long = "rpc-host",
default_value = "0.0.0.0",
env = "WASH_RPC_HOST"
)]
rpc_host: String,

/// RPC Port for connections, defaults to 4222 for local nats
#[structopt(short = "p", long = "rpc-port", default_value = "4222")]
#[structopt(
short = "p",
long = "rpc-port",
default_value = "4222",
env = "WASH_RPC_PORT"
)]
rpc_port: String,

/// Namespace prefix for wasmCloud command interface
#[structopt(short = "n", long = "ns-prefix", default_value = "default")]
ns_prefix: String,

/// Timeout length for RPC, defaults to 5 seconds
#[structopt(short = "t", long = "rpc-timeout", default_value = "5")]
#[structopt(
short = "t",
long = "rpc-timeout",
default_value = "5",
env = "WASH_RPC_TIMEOUT"
)]
rpc_timeout: u64,
}

Expand Down

0 comments on commit 0b9cb11

Please sign in to comment.