aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-05-22 15:06:53 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-22 15:06:53 +0200
commit0d179b042f931f385b8d2fa2c1817b597ba2ebe7 (patch)
treead09fa087adacac6f8d026e8d49ba6c6eb45dde4
parent028940fe3e0a87cdc421a6d07f1ecfb6c208b9d0 (diff)
jsonrpc: main example clean up
-rw-r--r--jsonrpc/README.md4
-rw-r--r--jsonrpc/src/lib.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/jsonrpc/README.md b/jsonrpc/README.md
index 3322671..091af99 100644
--- a/jsonrpc/README.md
+++ b/jsonrpc/README.md
@@ -101,7 +101,7 @@ async {
.expect("send a request");
let (sub_id, sub) = client
- .subscribe("Calc.log_subscribe", ())
+ .subscribe("HelloWorld.log_subscribe", ())
.await
.expect("Subscribe to log_subscribe method");
@@ -116,7 +116,7 @@ async {
smol::Timer::after(std::time::Duration::from_secs(5)).await;
client
- .unsubscribe("Calc.log_unsubscribe", sub_id)
+ .unsubscribe("HelloWorld.log_unsubscribe", sub_id)
.await
.expect("Unsubscribe from log_unsubscirbe method");
};
diff --git a/jsonrpc/src/lib.rs b/jsonrpc/src/lib.rs
index 7573c4d..626d159 100644
--- a/jsonrpc/src/lib.rs
+++ b/jsonrpc/src/lib.rs
@@ -6,13 +6,13 @@ mod error;
pub mod message;
mod server;
-pub use client::Client;
+pub use client::{Client, ClientBuilder};
pub use error::{Error, Result};
pub use server::{
channel::{ArcChannel, Channel, Subscription, SubscriptionID},
pubsub_service::{PubSubRPCMethod, PubSubRPCService},
service::{RPCMethod, RPCService},
- Server,
+ Server, ServerBuilder
};
pub use karyon_jsonrpc_macro::{rpc_impl, rpc_pubsub_impl};