From 4e9601c920f4afa948cddcbf0da83511ebb22e2c Mon Sep 17 00:00:00 2001 From: Abhinav Prakash Date: Sat, 6 Jul 2024 12:56:15 +0530 Subject: [PATCH] chore(rust): rename ockam hub -> ockam orchestrator --- examples/rust/file_transfer/examples/receiver.rs | 6 ++++-- examples/rust/file_transfer/examples/sender.rs | 4 ++-- examples/rust/get_started/examples/alice.rs | 4 ++-- examples/rust/get_started/examples/bob.rs | 6 ++++-- .../rust/tcp_inlet_and_outlet/examples/04-inlet.rs | 4 ++-- .../rust/tcp_inlet_and_outlet/examples/04-outlet.rs | 6 ++++-- examples/rust/tcp_inlet_and_outlet/tests/tests.rs | 2 +- .../rust/ockam/ockam/src/remote/lifecycle.rs | 10 +++++----- 8 files changed, 24 insertions(+), 18 deletions(-) diff --git a/examples/rust/file_transfer/examples/receiver.rs b/examples/rust/file_transfer/examples/receiver.rs index 7813faeab62..85e6c684e3f 100644 --- a/examples/rust/file_transfer/examples/receiver.rs +++ b/examples/rust/file_transfer/examples/receiver.rs @@ -107,8 +107,10 @@ async fn main(ctx: Context) -> Result<()> { // // All messages that arrive at that forwarding address will be sent to this program // using the TCP connection we created as a client. - let node_in_hub = tcp.connect("1.node.ockam.network:4000", tcp_options).await?; - let relay = node.create_relay(node_in_hub, RemoteRelayOptions::new()).await?; + let node_in_orchestrator = tcp.connect("1.node.ockam.network:4000", tcp_options).await?; + let relay = node + .create_relay(node_in_orchestrator, RemoteRelayOptions::new()) + .await?; println!("\n[✓] RemoteRelay was created on the node at: 1.node.ockam.network:4000"); println!("Forwarding address for Receiver is:"); println!("{}", relay.remote_address()); diff --git a/examples/rust/file_transfer/examples/sender.rs b/examples/rust/file_transfer/examples/sender.rs index 616aaf874d7..f80288b91f0 100644 --- a/examples/rust/file_transfer/examples/sender.rs +++ b/examples/rust/file_transfer/examples/sender.rs @@ -44,13 +44,13 @@ async fn main(ctx: Context) -> Result<()> { let forwarding_address = opt.address.trim(); // Connect to the cloud node over TCP - let node_in_hub = tcp + let node_in_orchestrator = tcp .connect("1.node.ockam.network:4000", TcpConnectionOptions::new()) .await?; // Combine the tcp address of the cloud node and the forwarding_address to get a route // to Receiver's secure channel listener. - let route_to_receiver_listener = route![node_in_hub, forwarding_address, "listener"]; + let route_to_receiver_listener = route![node_in_orchestrator, forwarding_address, "listener"]; // As Sender, connect to the Receiver's secure channel listener, and perform an // Authenticated Key Exchange to establish an encrypted secure channel with Receiver. diff --git a/examples/rust/get_started/examples/alice.rs b/examples/rust/get_started/examples/alice.rs index 21008aa368b..804da2cbc8c 100644 --- a/examples/rust/get_started/examples/alice.rs +++ b/examples/rust/get_started/examples/alice.rs @@ -24,10 +24,10 @@ async fn main(ctx: Context) -> Result<()> { // Combine the tcp address of the node and the forwarding_address to get a route // to Bob's secure channel listener. - let node_in_hub = tcp + let node_in_orchestrator = tcp .connect("1.node.ockam.network:4000", TcpConnectionOptions::new()) .await?; - let route_to_bob_listener = route![node_in_hub, forwarding_address, "listener"]; + let route_to_bob_listener = route![node_in_orchestrator, forwarding_address, "listener"]; // As Alice, connect to Bob's secure channel listener, and perform an // Authenticated Key Exchange to establish an encrypted secure channel with Bob. diff --git a/examples/rust/get_started/examples/bob.rs b/examples/rust/get_started/examples/bob.rs index 8b88e3f130b..97a68a7658e 100644 --- a/examples/rust/get_started/examples/bob.rs +++ b/examples/rust/get_started/examples/bob.rs @@ -52,10 +52,12 @@ async fn main(ctx: Context) -> Result<()> { // // All messages that arrive at that forwarding address will be sent to this program // using the TCP connection we created as a client. - let node_in_hub = tcp + let node_in_orchestrator = tcp .connect("1.node.ockam.network:4000", TcpConnectionOptions::new()) .await?; - let relay = node.create_relay(node_in_hub, RemoteRelayOptions::new()).await?; + let relay = node + .create_relay(node_in_orchestrator, RemoteRelayOptions::new()) + .await?; println!("\n[✓] RemoteRelay was created on the node at: 1.node.ockam.network:4000"); println!("Forwarding address for Bob is:"); println!("{}", relay.remote_address()); diff --git a/examples/rust/tcp_inlet_and_outlet/examples/04-inlet.rs b/examples/rust/tcp_inlet_and_outlet/examples/04-inlet.rs index 360eefa7c14..b409978db18 100644 --- a/examples/rust/tcp_inlet_and_outlet/examples/04-inlet.rs +++ b/examples/rust/tcp_inlet_and_outlet/examples/04-inlet.rs @@ -19,10 +19,10 @@ async fn main(ctx: Context) -> Result<()> { // Expect second command line argument to be the Outlet node forwarder address let forwarding_address = std::env::args().nth(2).expect("no outlet forwarding address given"); - let node_in_hub = tcp + let node_in_orchestrator = tcp .connect("1.node.ockam.network:4000", TcpConnectionOptions::new()) .await?; - let r = route![node_in_hub, forwarding_address, "secure_channel_listener"]; + let r = route![node_in_orchestrator, forwarding_address, "secure_channel_listener"]; let channel = node.create_secure_channel(&e, r, SecureChannelOptions::new()).await?; // We know Secure Channel address that tunnels messages to the node with an Outlet, diff --git a/examples/rust/tcp_inlet_and_outlet/examples/04-outlet.rs b/examples/rust/tcp_inlet_and_outlet/examples/04-outlet.rs index 226c81866cd..2a9858c9c75 100644 --- a/examples/rust/tcp_inlet_and_outlet/examples/04-outlet.rs +++ b/examples/rust/tcp_inlet_and_outlet/examples/04-outlet.rs @@ -49,8 +49,10 @@ async fn main(ctx: Context) -> Result<()> { // // All messages that arrive at that forwarding address will be sent to this program // using the TCP connection we created as a client. - let node_in_hub = tcp.connect("1.node.ockam.network:4000", tcp_options).await?; - let relay = node.create_relay(node_in_hub, RemoteRelayOptions::new()).await?; + let node_in_orchestrator = tcp.connect("1.node.ockam.network:4000", tcp_options).await?; + let relay = node + .create_relay(node_in_orchestrator, RemoteRelayOptions::new()) + .await?; println!("\n[✓] RemoteRelay was created on the node at: 1.node.ockam.network:4000"); println!("Forwarding address in Hub is:"); println!("{}", relay.remote_address()); diff --git a/examples/rust/tcp_inlet_and_outlet/tests/tests.rs b/examples/rust/tcp_inlet_and_outlet/tests/tests.rs index 5141b438988..4336b5ee243 100644 --- a/examples/rust/tcp_inlet_and_outlet/tests/tests.rs +++ b/examples/rust/tcp_inlet_and_outlet/tests/tests.rs @@ -79,7 +79,7 @@ fn run_03_inlet_outlet_separate_processes_secure_channel() -> Result<(), Error> #[test] #[ignore] -fn run_04_inlet_outlet_seperate_processes_secure_channel_via_ockam_hub() -> Result<(), Error> { +fn run_04_inlet_outlet_seperate_processes_secure_channel_via_ockam_orchestrator() -> Result<(), Error> { let port = rand::thread_rng().gen_range(10000..65535); // Spawn outlet, wait for it to start up, grab dynamic forwarding address let outlet = CmdBuilder::new("cargo run --example 04-outlet ockam.io:80").spawn()?; diff --git a/implementations/rust/ockam/ockam/src/remote/lifecycle.rs b/implementations/rust/ockam/ockam/src/remote/lifecycle.rs index be99983a9a6..11fdaa73b9b 100644 --- a/implementations/rust/ockam/ockam/src/remote/lifecycle.rs +++ b/implementations/rust/ockam/ockam/src/remote/lifecycle.rs @@ -65,7 +65,7 @@ impl RemoteRelay { /// Create and start static RemoteRelay at predefined address with given Ockam Orchestrator route pub async fn create_static( ctx: &Context, - hub_route: impl Into, + orchestrator_route: impl Into, alias: impl Into, options: RemoteRelayOptions, ) -> Result { @@ -79,7 +79,7 @@ impl RemoteRelay { )) .await?; - let registration_route = route![hub_route.into(), "static_forwarding_service"]; + let registration_route = route![orchestrator_route.into(), "static_forwarding_service"]; let flow_control_id = options.setup_flow_control(ctx.flow_controls(), &addresses, registration_route.next()?); @@ -108,10 +108,10 @@ impl RemoteRelay { Ok(resp) } - /// Create and start new ephemeral RemoteRelay at random address with given Ockam Hub route + /// Create and start new ephemeral RemoteRelay at random address with given Ockam Orchestrator route pub async fn create( ctx: &Context, - hub_route: impl Into, + orchestrator_route: impl Into, options: RemoteRelayOptions, ) -> Result { let addresses = Addresses::generate(RelayType::Ephemeral); @@ -124,7 +124,7 @@ impl RemoteRelay { )) .await?; - let registration_route = route![hub_route, "forwarding_service"]; + let registration_route = route![orchestrator_route, "forwarding_service"]; let flow_control_id = options.setup_flow_control(ctx.flow_controls(), &addresses, registration_route.next()?);