Skip to content

Commit

Permalink
refactor(rust): add comments for relays
Browse files Browse the repository at this point in the history
  • Loading branch information
etorreborre committed Oct 3, 2023
1 parent 5dd9376 commit 5d854b2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ impl NodeManager {
forwarders
}

/// Create a new Relay
/// The Connection encapsulates the list of workers required on the relay route.
/// This route is monitored in the `InMemoryNode` and the workers are restarted if necessary
/// when the route is unresponsive
pub async fn create_forwarder(
&self,
ctx: &Context,
Expand Down Expand Up @@ -143,9 +147,10 @@ impl NodeManager {
}
}

pub(super) async fn delete_forwarder(
/// This function removes an existing relay based on its remote address
pub async fn delete_forwarder(
&self,
ctx: &mut Context,
ctx: &Context,
req: &RequestHeader,
remote_address: &str,
) -> Result<Response<Option<ForwarderInfo>>, Response<Error>> {
Expand Down Expand Up @@ -180,6 +185,7 @@ impl NodeManager {
}
}

/// This function finds an existing relay and returns its configuration
pub(super) async fn show_forwarder(
&self,
req: &RequestHeader,
Expand Down

0 comments on commit 5d854b2

Please sign in to comment.