From b592b2ce12c98085d1c5dcbc6723e4fce44678f1 Mon Sep 17 00:00:00 2001 From: "yulai.li" Date: Mon, 21 Mar 2022 16:58:54 +0800 Subject: [PATCH 1/2] Add method for set use local subchannel pool feature Signed-off-by: yulai.li --- src/channel.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/channel.rs b/src/channel.rs index 43e06264..edfc4728 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -373,6 +373,17 @@ impl ChannelBuilder { self } + /// Set use local subchannel pool + /// + /// This method allows channel use it's owned subchannel pool. + pub fn use_local_subchannel_pool(mut self, enable: bool) -> ChannelBuilder { + self.options.insert( + Cow::Borrowed(grpcio_sys::GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL), + Options::Integer(enable as i32), + ); + self + } + /// Set a raw integer configuration. /// /// This method is only for bench usage, users should use the encapsulated API instead. From 770aa7c79141caa37df21dfb5d935bc08e9d2995 Mon Sep 17 00:00:00 2001 From: "yulai.li" Date: Tue, 22 Mar 2022 11:33:24 +0800 Subject: [PATCH 2/2] Fix cargo check Signed-off-by: yulai.li --- src/channel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/channel.rs b/src/channel.rs index edfc4728..f2fccd13 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -373,8 +373,8 @@ impl ChannelBuilder { self } - /// Set use local subchannel pool - /// + /// Set use local subchannel pool + /// /// This method allows channel use it's owned subchannel pool. pub fn use_local_subchannel_pool(mut self, enable: bool) -> ChannelBuilder { self.options.insert(