diff --git a/services/tunnelbroker/src/websockets/session.rs b/services/tunnelbroker/src/websockets/session.rs --- a/services/tunnelbroker/src/websockets/session.rs +++ b/services/tunnelbroker/src/websockets/session.rs @@ -16,8 +16,9 @@ use tokio::io::AsyncWrite; use tracing::{debug, error, info}; use tunnelbroker_messages::{ - send_confirmation::Failure, send_confirmation::MessageSentStatus, - session::DeviceTypes, MessageToDeviceRequest, Messages, + message_to_device_request_status::Failure, + message_to_device_request_status::MessageSentStatus, session::DeviceTypes, + MessageToDeviceRequest, Messages, }; use crate::database::{self, DatabaseClient, DeviceMessage}; diff --git a/shared/tunnelbroker_messages/src/lib.rs b/shared/tunnelbroker_messages/src/lib.rs --- a/shared/tunnelbroker_messages/src/lib.rs +++ b/shared/tunnelbroker_messages/src/lib.rs @@ -1,4 +1,4 @@ pub mod messages; +pub use message_to_device_request_status::*; pub use messages::*; -pub use send_confirmation::*; diff --git a/shared/tunnelbroker_messages/src/messages/keys.rs b/shared/tunnelbroker_messages/src/messages/keys.rs --- a/shared/tunnelbroker_messages/src/messages/keys.rs +++ b/shared/tunnelbroker_messages/src/messages/keys.rs @@ -1,4 +1,4 @@ -// Messages sent between Tunnelbroker and a device +//! Messages sent from Tunnelbroker to a device. use serde::{Deserialize, Serialize}; diff --git a/shared/tunnelbroker_messages/src/messages/message_to_device.rs b/shared/tunnelbroker_messages/src/messages/message_to_device.rs --- a/shared/tunnelbroker_messages/src/messages/message_to_device.rs +++ b/shared/tunnelbroker_messages/src/messages/message_to_device.rs @@ -1,4 +1,4 @@ -// Messages sent between Tunnelbroker and a device via WebSocket +//! Messages sent between Tunnelbroker and a device via WebSocket. use serde::{Deserialize, Serialize}; diff --git a/shared/tunnelbroker_messages/src/messages/message_to_device_request.rs b/shared/tunnelbroker_messages/src/messages/message_to_device_request.rs --- a/shared/tunnelbroker_messages/src/messages/message_to_device_request.rs +++ b/shared/tunnelbroker_messages/src/messages/message_to_device_request.rs @@ -1,4 +1,4 @@ -// Message sent from WebSocket clients to Tunnelbroker +//! Message sent from Tunnelbroker to WebSocket. use serde::{Deserialize, Serialize}; diff --git a/shared/tunnelbroker_messages/src/messages/send_confirmation.rs b/shared/tunnelbroker_messages/src/messages/message_to_device_request_status.rs rename from shared/tunnelbroker_messages/src/messages/send_confirmation.rs rename to shared/tunnelbroker_messages/src/messages/message_to_device_request_status.rs diff --git a/shared/tunnelbroker_messages/src/messages/mod.rs b/shared/tunnelbroker_messages/src/messages/mod.rs --- a/shared/tunnelbroker_messages/src/messages/mod.rs +++ b/shared/tunnelbroker_messages/src/messages/mod.rs @@ -1,14 +1,15 @@ -// Messages sent between Tunnelbroker and a device +//! Messages sent between Tunnelbroker and a device. + pub mod keys; pub mod message_to_device; pub mod message_to_device_request; -pub mod send_confirmation; +pub mod message_to_device_request_status; pub mod session; pub use keys::*; pub use message_to_device::*; pub use message_to_device_request::*; -pub use send_confirmation::*; +pub use message_to_device_request_status::*; pub use session::*; use serde::{Deserialize, Serialize}; diff --git a/shared/tunnelbroker_messages/src/messages/session.rs b/shared/tunnelbroker_messages/src/messages/session.rs --- a/shared/tunnelbroker_messages/src/messages/session.rs +++ b/shared/tunnelbroker_messages/src/messages/session.rs @@ -1,12 +1,12 @@ -// Messages sent between Tunnelbroker and a device +//! The first message sent from WebSocket client to Tunnelbroker. use serde::{Deserialize, Serialize}; -/// The workflow when estabilishing a Tunnelbroker connection: +/// The workflow when establishing a Tunnelbroker connection: /// - Client sends ConnectionInitializationMessage /// - Tunnelbroker validates access_token with identity service /// - Tunnelbroker emits an AMQP message declaring that it has opened a new -/// connection with a given device, so that the respective tunnelbroker +/// connection with a given device, so that the respective Tunnelbroker /// instance can close the existing connection. /// - Tunnelbroker returns a session_id representing that the connection was /// accepted