Page MenuHomePhabricator

D8214.id27779.diff
No OneTemporary

D8214.id27779.diff

diff --git a/services/tunnelbroker/src/amqp.rs b/services/tunnelbroker/src/amqp.rs
--- a/services/tunnelbroker/src/amqp.rs
+++ b/services/tunnelbroker/src/amqp.rs
@@ -3,12 +3,12 @@
use tracing::info;
pub async fn connect() -> Connection {
- let amqp_uri = format!("amqp://{}:{}", CONFIG.amqp_address, CONFIG.amqp_port);
- let conn = Connection::connect(&amqp_uri, ConnectionProperties::default())
- .await
- .expect("Unable to connect to amqp endpoint");
+ let conn =
+ Connection::connect(&CONFIG.amqp_uri, ConnectionProperties::default())
+ .await
+ .expect("Unable to connect to amqp endpoint");
- info!("Connected to amqp endpoint: {}", &amqp_uri);
+ info!("Connected to amqp endpoint: {}", &CONFIG.amqp_uri);
return conn;
}
diff --git a/services/tunnelbroker/src/config.rs b/services/tunnelbroker/src/config.rs
--- a/services/tunnelbroker/src/config.rs
+++ b/services/tunnelbroker/src/config.rs
@@ -13,12 +13,9 @@
/// HTTP server listening port
#[arg(long, default_value_t = 51001)]
pub http_port: u16,
- /// AMQP server listening port
- #[arg(long, default_value_t = 5672)]
- pub amqp_port: u16,
- /// AMQP server listening port
- #[arg(long, default_value_t = String::from("localhost"))]
- pub amqp_address: String,
+ /// AMQP server URI
+ #[arg(long, default_value_t = String::from("amqp://localhost:5672"))]
+ pub amqp_uri: String,
/// AWS Localstack service URL
#[arg(env = "LOCALSTACK_ENDPOINT")]
#[arg(long)]

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 5:56 PM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607908
Default Alt Text
D8214.id27779.diff (1 KB)

Event Timeline