pub struct ManagedChannelPoolBuilder { /* private fields */ }Expand description
Builder for creating a ChannelPool.
Implementations§
Source§impl ManagedChannelPoolBuilder
impl ManagedChannelPoolBuilder
Sourcepub fn new(endpoint: impl Into<EndpointTemplate>) -> Self
pub fn new(endpoint: impl Into<EndpointTemplate>) -> Self
Create a new ChannelPoolBuilder from the given endpoint template.
Sourcepub fn dns_interval(&mut self, dns_interval: impl Into<Duration>) -> &mut Self
pub fn dns_interval(&mut self, dns_interval: impl Into<Duration>) -> &mut Self
Set the DNS check interval.
Set how often the resulting pool will check the DNS for new IP addresses. Default is 5 seconds.
Sourcepub fn build(self) -> ManagedChannelPool
pub fn build(self) -> ManagedChannelPool
Build the ChannelPool.
This function will create a new channel pool from the given endpoint template and settings. This includes starting channel pool’s background tasks.
Trait Implementations§
Source§impl Clone for ManagedChannelPoolBuilder
impl Clone for ManagedChannelPoolBuilder
Source§fn clone(&self) -> ManagedChannelPoolBuilder
fn clone(&self) -> ManagedChannelPoolBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ManagedChannelPoolBuilder
impl RefUnwindSafe for ManagedChannelPoolBuilder
impl Send for ManagedChannelPoolBuilder
impl Sync for ManagedChannelPoolBuilder
impl Unpin for ManagedChannelPoolBuilder
impl UnwindSafe for ManagedChannelPoolBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request