pub struct LoadBalancedChannelBuilder<T, S> { /* private fields */ }
Expand description

Builder to configure and create a LoadBalancedChannel.

Implementations

Set the ServiceDefinition of the gRPC server service

  • e.g. my.service.uri and 5000.

All the service endpoints of a ServiceDefinition will be constructed by resolving all ips from ServiceDefinition::hostname, and using the portnumber ServiceDefinition::port.

Set a custom 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.

Set the ResolutionStrategy.

Default set to ResolutionStrategy::Lazy.

If ResolutionStrategy::Lazy the domain name will be resolved after-the-fact.

Instead, if ResolutionStrategy::Eager is set the domain name will be attempted resolved once before the LoadBalancedChannel is created, which ensures that the channel will have a non-empty of IPs on startup. If it fails the channel creation will also fail.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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