From eaf1bc07f5e1140ce9dd3e23399b28b340fc7793 Mon Sep 17 00:00:00 2001 From: amigin Date: Tue, 4 Jun 2024 13:03:41 +0200 Subject: [PATCH] Iteratinve Fix --- my-grpc-client-macros/readme.md | 5 +---- my-grpc-client-macros/src/grpc_client/generate.rs | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/my-grpc-client-macros/readme.md b/my-grpc-client-macros/readme.md index 624e533..3acf378 100644 --- a/my-grpc-client-macros/readme.md +++ b/my-grpc-client-macros/readme.md @@ -21,10 +21,7 @@ use my_grpc_client_macros::generate_grpc_client; {fn_name:"Get", retries:2} ] )] -pub struct KeyValueGrpcClient { - channel: my_grpc_extensions::GrpcChannel, -} - +pub struct KeyValueGrpcClient; ``` diff --git a/my-grpc-client-macros/src/grpc_client/generate.rs b/my-grpc-client-macros/src/grpc_client/generate.rs index 3277d26..bfaff16 100644 --- a/my-grpc-client-macros/src/grpc_client/generate.rs +++ b/my-grpc-client-macros/src/grpc_client/generate.rs @@ -126,13 +126,13 @@ pub fn generate( } pub struct #struct_name{ - channel: my_grpc_extensions::GrpcChannel, + channel: my_grpc_extensions::GrpcChannelPool, } impl #struct_name{ pub fn new(get_grpc_address: std::sync::Arc,) -> Self { Self { - channel: my_grpc_extensions::GrpcChannel::new( + channel: my_grpc_extensions::GrpcChannelPool::new( get_grpc_address, std::sync::Arc::new(MyGrpcServiceFactory), std::time::Duration::from_secs(#timeout_sec),