fix(rust): step 5 fix in example crate
use ockam::{
- async_worker, Context, RemoteMailbox, Result, Routed, SecureChannel,
+ async_worker, Context, RemoteForwarder, Result, Routed, SecureChannel,
SecureChannelListenerMessage, Worker,
};
use ockam_transport_tcp::TcpTransport;
+use ockam_vault_sync_core::VaultWorker;
+use ockam_vault::SoftwareVault;
struct EchoService;
@@ -25,12 +27,13 @@ async fn main(mut ctx: Context) -> Result<()> {
tcp.connect(hub).await?;
- SecureChannel::create_listener(&ctx, "secure_channel").await?;
+ let vault_address = VaultWorker::start(&ctx, SoftwareVault::default()).await?;
+
+ SecureChannel::create_listener(&ctx, "secure_channel", vault_address).await?;
ctx.start_worker("echo_service", EchoService).await?;
- let mailbox =
- RemoteMailbox::<SecureChannelListenerMessage>::create(&mut ctx, hub, "secure_channel")
+ let mailbox = RemoteForwarder::create(&mut ctx, hub, "secure_channel")
.await?;
println!(
