Skip to content

Commit

Permalink
feat(rs-examples): default to rust prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Aug 13, 2024
1 parent 5fafb82 commit 4da35db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/rust/echo-stream-nats-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ struct Args {
#[arg(short, long, default_value = "nats://127.0.0.1:4222")]
nats: Url,

/// Prefixes to invoke `wrpc-examples:hello/handler.hello` on
/// Prefixes to invoke `wrpc-examples:echo-stream/handler.echo` on
#[arg(default_value = "rust")]
prefixes: Vec<String>,
}

Expand Down
4 changes: 2 additions & 2 deletions examples/rust/echo-stream-nats-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct Args {
#[arg(short, long, default_value = "nats://127.0.0.1:4222")]
nats: Url,

/// Prefix to serve `wrpc-examples:hello/handler.hello` on
/// Prefix to serve `wrpc-examples:echo-stream/handler.echo` on
#[arg(default_value = "rust")]
prefix: String,
}
Expand Down Expand Up @@ -74,7 +74,7 @@ async fn main() -> anyhow::Result<()> {
Server,
)
.await
.context("failed to serve `wrpc-examples.hello/handler.hello`")?;
.context("failed to serve `wrpc-examples:echo-stream/handler.echo`")?;
// NOTE: This will conflate all invocation streams into a single stream via `futures::stream::SelectAll`,
// to customize this, iterate over the returned `invocations` and set up custom handling per export
let mut invocations = select_all(invocations.into_iter().map(
Expand Down
1 change: 1 addition & 0 deletions examples/rust/hello-nats-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct Args {
nats: Url,

/// Prefixes to invoke `wrpc-examples:hello/handler.hello` on
#[arg(default_value = "rust")]
prefixes: Vec<String>,
}

Expand Down
1 change: 1 addition & 0 deletions examples/rust/wasi-keyvalue-nats-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct Args {
nats: Url,

/// Prefixes to invoke `wasi:keyvalue/store` functions on
#[arg(default_value = "rust")]
prefixes: Vec<String>,
}

Expand Down

0 comments on commit 4da35db

Please sign in to comment.