From 844f6214f89499f6d3aa2d1a4e194c0c93146b16 Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Thu, 24 Oct 2024 20:58:13 +0200 Subject: [PATCH] changes: made client public, also renamed client AMQPWorker -> BunBunClient --- src/client.rs | 4 ++-- src/lib.rs | 2 +- src/test/mod.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/client.rs b/src/client.rs index 4130262..16b72be 100644 --- a/src/client.rs +++ b/src/client.rs @@ -18,11 +18,11 @@ use crate::ResultHeader; /// With this client you can send messages to a queue that other microservices /// will process #[derive(Debug)] -pub struct AMQPClient { +pub struct BunBunClient { conn: Connection, } -impl AMQPClient { +impl BunBunClient { /// Creates an rpc client /// /// # Examples diff --git a/src/lib.rs b/src/lib.rs index 7ab5040..77e6155 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ use std::{ sync::Arc, }; use tokio::sync::Mutex; -mod client; +pub mod client; mod test; pub struct BunBunWorker { diff --git a/src/test/mod.rs b/src/test/mod.rs index a8dc82b..00af14e 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -10,7 +10,7 @@ mod test { use tracing_test::traced_test; use crate::{ - client::{AMQPClient, RPCClientTask}, + client::{BunBunClient, RPCClientTask}, BunBunWorker, RPCServerTask, }; @@ -117,7 +117,7 @@ mod test { #[traced_test] async fn rpc_client() { // - let mut client = AMQPClient::new(env::var("AMQP_SERVER_URL").unwrap().as_str()) + let mut client = BunBunClient::new(env::var("AMQP_SERVER_URL").unwrap().as_str()) .await .unwrap(); let result = client @@ -142,7 +142,7 @@ mod test { #[traced_test] async fn rpc_client_spam_multithread() { // - let mut client = AMQPClient::new(env::var("AMQP_SERVER_URL").unwrap().as_str()) + let mut client = BunBunClient::new(env::var("AMQP_SERVER_URL").unwrap().as_str()) .await .unwrap(); let client = Arc::new(Mutex::new(client));