Skip to content

Commit

Permalink
rust-client: fix CLI, add README section
Browse files Browse the repository at this point in the history
  • Loading branch information
elenaf9 authored and dennis-tra committed Aug 9, 2022
1 parent e38d695 commit e7fc2b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,28 @@ Resource requirements:

### `rust-client`

**TODO**
Rust implementation of the punchr client.

Help output:
```
Rust Punchr Client 0.1.0
USAGE:
rust-client [OPTIONS]
OPTIONS:
-h, --help Print help information
--pem <PATH_TO_PEM_FILE> Path to PEM encoded CA certificate against which the server's
TLS certificate is verified [default: hardcoded CA
certificate for punchr.dtrautwein.eu]
--rounds <NUMBER_OF_ROUNDS> Only run a fixed number of rounds
--seed <SECRET_KEY_SEED> Fixed value to generate a deterministic peer id
--server <SERVER_URL> URL and port of the punchr server. Note that the scheme ist
required [default: https://punchr.dtrautwein.eu:443]
-V, --version Print version information
Note: The api key for authentication is read from env value "API_KEY".
```

## Install

Expand Down
8 changes: 4 additions & 4 deletions rust-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ struct Opt {
)]
server: String,

/// Path to a file with the pem encoded TLS Certificate of the server
/// [default: hardcoded CERTIFICATE for punchr.dtrautwein.eu]
/// Path to PEM encoded CA certificate against which the server's TLS certificate is verified
/// [default: hardcoded CA certificate for punchr.dtrautwein.eu]
#[clap(long, name = "PATH_TO_PEM_FILE")]
pem: Option<String>,

/// Fixed value to generate deterministic peer id.
/// Fixed value to generate a deterministic peer id.
#[clap(long, name = "SECRET_KEY_SEED")]
seed: Option<u8>,

/// Only run a limited number of rounds.
/// Only run a fixed number of rounds.
#[clap(long, name = "NUMBER_OF_ROUNDS")]
rounds: Option<usize>,
}
Expand Down

0 comments on commit e7fc2b6

Please sign in to comment.