Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382871
D7526.id25374.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
D7526.id25374.diff
View Options
diff --git a/services/tunnelbroker/src/comm_server/mod.rs b/services/tunnelbroker/src/grpc/mod.rs
rename from services/tunnelbroker/src/comm_server/mod.rs
rename to services/tunnelbroker/src/grpc/mod.rs
--- a/services/tunnelbroker/src/comm_server/mod.rs
+++ b/services/tunnelbroker/src/grpc/mod.rs
@@ -22,7 +22,7 @@
}
}
-pub async fn run_grpc_server() -> Result<(), tonic::transport::Error> {
+pub async fn run_server() -> Result<(), tonic::transport::Error> {
let addr = format!("[::1]:{}", constants::GRPC_SERVER_PORT)
.parse()
.expect("Unable to parse gRPC address");
diff --git a/services/tunnelbroker/src/main.rs b/services/tunnelbroker/src/main.rs
--- a/services/tunnelbroker/src/main.rs
+++ b/services/tunnelbroker/src/main.rs
@@ -1,5 +1,5 @@
-pub mod comm_server;
pub mod constants;
+pub mod grpc;
pub mod websockets;
use std::io::{self, Error, ErrorKind};
use tracing;
@@ -10,11 +10,11 @@
tracing::subscriber::set_global_default(subscriber)
.expect("Unable to configure tracing");
- let comm_server = comm_server::run_grpc_server();
- let websocket_server = websockets::create_server();
+ let grpc_server = grpc::run_server();
+ let websocket_server = websockets::run_server();
tokio::select! {
- Ok(_) = comm_server => { Ok(()) },
+ Ok(_) = grpc_server => { Ok(()) },
Ok(_) = websocket_server => { Ok(()) },
else => {
tracing::error!("A grpc or websocket server crashed.");
diff --git a/services/tunnelbroker/src/websockets/mod.rs b/services/tunnelbroker/src/websockets/mod.rs
--- a/services/tunnelbroker/src/websockets/mod.rs
+++ b/services/tunnelbroker/src/websockets/mod.rs
@@ -3,7 +3,7 @@
use tokio::net::{TcpListener, TcpStream};
use tracing::info;
-pub async fn create_server() -> Result<(), Error> {
+pub async fn run_server() -> Result<(), Error> {
let addr = env::var("COMM_TUNNELBROKER_WEBSOCKET_ADDR")
.unwrap_or_else(|_| "127.0.0.1:51001".to_string());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 12:28 PM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596983
Default Alt Text
D7526.id25374.diff (1 KB)
Attached To
Mode
D7526: [Tunnelbroker] Use more consistent renaming
Attached
Detach File
Event Timeline
Log In to Comment