Struct ginepro::LoadBalancedChannelBuilder [−][src]
pub struct LoadBalancedChannelBuilder<T> { /* fields omitted */ }
Expand description
Builder to configure and create a LoadBalancedChannel
.
Implementations
pub async fn new_with_service<H: Into<ServiceDefinition>>(
service_definition: H
) -> Result<LoadBalancedChannelBuilder<DnsResolver>, Error>
pub async fn new_with_service<H: Into<ServiceDefinition>>(
service_definition: H
) -> Result<LoadBalancedChannelBuilder<DnsResolver>, Error>
Set the ServiceDefinition
of the gRPC server service
- e.g.
my.service.uri
and5000
.
All the service endpoints of a ServiceDefinition
will be
constructed by resolving all ips from ServiceDefinition::hostname
, and
using the portnumber ServiceDefinition::port
.
pub fn lookup_service<T: LookupService + Send + Sync + 'static>(
self,
lookup_service: T
) -> LoadBalancedChannelBuilder<T>
pub fn lookup_service<T: LookupService + Send + Sync + 'static>(
self,
lookup_service: T
) -> LoadBalancedChannelBuilder<T>
Set a custom LookupService
.
pub fn new<H: Into<ServiceDefinition>>(
service_definition: H,
lookup_service: T
) -> LoadBalancedChannelBuilder<T>
pub fn new<H: Into<ServiceDefinition>>(
service_definition: H,
lookup_service: T
) -> LoadBalancedChannelBuilder<T>
Returns a LoadBalancedChannelBuilder
with the ServiceDefinition
and
the customized LookupService
.
Set the how often, the client should probe for changes to gRPC server endpoints. Default interval in seconds is 10.
Set a timeout that will be applied to every new Endpoint
.
Configure the channel to use tls.
A tls_config
MUST be specified to use the HTTPS
scheme.
Construct a LoadBalancedChannel
from the LoadBalancedChannelBuilder
instance.
Auto Trait Implementations
impl<T> !RefUnwindSafe for LoadBalancedChannelBuilder<T>
impl<T> Send for LoadBalancedChannelBuilder<T> where
T: Send,
impl<T> Sync for LoadBalancedChannelBuilder<T> where
T: Sync,
impl<T> Unpin for LoadBalancedChannelBuilder<T> where
T: Unpin,
impl<T> !UnwindSafe for LoadBalancedChannelBuilder<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more