From d60a62eb22d66745379f0533af9bf89288b3aafd Mon Sep 17 00:00:00 2001 From: Enola Knezevic Date: Tue, 19 Nov 2024 15:32:17 +0100 Subject: [PATCH] renamed target to target-app --- README.md | 6 +++--- src/beam.rs | 4 ++-- src/config.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5bab7e7..7fa0a44 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To run a standalone Prism, you need at least one running [Samply.Beam.Proxy](htt You can compile and run this application via Cargo.: ```bash -cargo run -- --beam-proxy-url http://localhost:8082 --beam-app-id-long app2.proxy2.broker --api-key App1Secret --bind-addr 127.0.0.1:8066 --sites proxy1 --cors-origin any --project bbmri --target app1 +cargo run -- --beam-proxy-url http://localhost:8082 --beam-app-id-long app2.proxy2.broker --api-key App1Secret --bind-addr 127.0.0.1:8066 --sites proxy1 --cors-origin any --project bbmri --target-app app1 ``` ## Configuration @@ -37,8 +37,8 @@ The following environment variables are mandatory for the usage of Prism. ``` --wait-count Wait for results count [env: WAIT_COUNT=] [default: 32] ---target - Target_application_name [env: TARGET=] [default: focus] +--target-app + Target application name [env: TARGET_APP=] [default: focus] --bind-addr The socket address this server will bind to [env: BIND_ADDR=] [default: 0.0.0.0:8080] ``` diff --git a/src/beam.rs b/src/beam.rs index 4dcdc2e..8204542 100644 --- a/src/beam.rs +++ b/src/beam.rs @@ -4,7 +4,7 @@ use beam_lib::{AppId, MsgId, RawString, TaskRequest}; use uuid::Uuid; pub fn create_beam_task(target_sites: Vec) -> TaskRequest { - let target = &CONFIG.target; + let target_app = &CONFIG.target_app; let id = MsgId::new(); let proxy_id = &CONFIG.beam_app_id_long.proxy_id(); let query_encoded: String = BASE64.encode( @@ -20,7 +20,7 @@ pub fn create_beam_task(target_sites: Vec) -> TaskRequest { .1; let to = target_sites .iter() - .map(|site| AppId::new_unchecked(format!("{target}.{site}.{broker_id}"))) + .map(|site| AppId::new_unchecked(format!("{target_app}.{site}.{broker_id}"))) .collect(); let metadata = { serde_json::json!({ diff --git a/src/config.rs b/src/config.rs index 735671c..5bb6bf9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -63,7 +63,7 @@ struct CliArgs { /// Target_application_name #[clap(long, env, value_parser, default_value = "focus")] - target: String, + target_app: String, } #[derive(Debug)] @@ -76,7 +76,7 @@ pub(crate) struct Config { pub project: String, pub bind_addr: SocketAddr, pub query_unencoded: String, - pub target: String, + pub target_app: String, } impl Config { @@ -92,7 +92,7 @@ impl Config { project: cli_args.project, bind_addr: cli_args.bind_addr, query_unencoded: get_query_unencoded(), - target: cli_args.target, + target_app: cli_args.target_app, }; Ok(config) }