Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3397528
D8214.id27779.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8214.id27779.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8214: [Tunnelbroker] Make uri format more flexible
Attached
Detach File
Event Timeline
Log In to Comment