Struct grpcio::ChannelBuilder
[−]
[src]
pub struct ChannelBuilder { /* fields omitted */ }
Channel configuration object.
Methods
impl ChannelBuilder
[src]
pub fn override_ssl_target<S: Into<Vec<u8>>>(self, target: S) -> ChannelBuilder
[src]
The caller of the secure_channel_create functions may override the target name used for SSL host name checking using this channel argument. This should be used for testing only.
pub fn secure_connect(self, addr: &str, creds: ChannelCredentials) -> Channel
[src]
impl ChannelBuilder
[src]
pub fn new(env: Arc<Environment>) -> ChannelBuilder
[src]
[src]
Default authority to pass if none specified on call construction.
pub fn max_concurrent_stream(self, num: usize) -> ChannelBuilder
[src]
Maximum number of concurrent incoming streams to allow on a http2 connection.
pub fn max_receive_message_len(self, len: usize) -> ChannelBuilder
[src]
Maximum message length that the channel can receive. usize::MAX means unlimited.
pub fn max_send_message_len(self, len: usize) -> ChannelBuilder
[src]
Maximum message length that the channel can send. -1 means unlimited.
pub fn max_reconnect_backoff(self, backoff: Duration) -> ChannelBuilder
[src]
The maximum time between subsequent connection attempts.
pub fn initial_reconnect_backoff(self, backoff: Duration) -> ChannelBuilder
[src]
The time between the first and second connection attempts.
pub fn https_initial_seq_number(self, number: usize) -> ChannelBuilder
[src]
Initial sequence number for http2 transports.
pub fn stream_initial_window_size(self, window_size: usize) -> ChannelBuilder
[src]
Amount to read ahead on individual streams. Defaults to 64kb, larger values can help throughput on high-latency connections.
pub fn primary_user_agent(self, agent: &str) -> ChannelBuilder
[src]
Primary user agent: goes at the start of the user-agent metadata sent on each request.
pub fn reuse_port(self, reuse: bool) -> ChannelBuilder
[src]
If enable, allow the use of SO_REUSEPORT if it's available (default true).
pub fn tcp_read_chunk_size(self, bytes: usize) -> ChannelBuilder
[src]
How large a slice to try and read from the wire each time.
pub fn tcp_min_read_chunk_size(self, bytes: usize) -> ChannelBuilder
[src]
How minimal large a slice to try and read from the wire each time.
pub fn tcp_max_read_chunk_size(self, bytes: usize) -> ChannelBuilder
[src]
How maximal large a slice to try and read from the wire each time.
pub fn http2_write_buffer_size(self, size: usize) -> ChannelBuilder
[src]
How much data are we willing to queue up per stream if write_buffer_hint is set. This is an upper bound.
pub fn http2_max_frame_size(self, size: usize) -> ChannelBuilder
[src]
How big a frame are we willing to receive via HTTP2. Min 16384, max 16777215. Larger values give lower CPU usage for large messages, but more head of line blocking for small messages.
pub fn http2_bdp_probe(self, enable: bool) -> ChannelBuilder
[src]
Set BDP probing.
pub fn http2_min_sent_ping_interval_without_data(
self,
interval: Duration
) -> ChannelBuilder
[src]
self,
interval: Duration
) -> ChannelBuilder
Minimum time between sending successive ping frames without receiving any data frame.
pub fn http2_min_recv_ping_interval_without_data(
self,
interval: Duration
) -> ChannelBuilder
[src]
self,
interval: Duration
) -> ChannelBuilder
Minimum allowed time between receiving successive ping frames without sending any data frame.
pub fn http2_max_pings_without_data(self, num: usize) -> ChannelBuilder
[src]
How many pings can we send before needing to send a data frame or header frame? (0 indicates that an infinite number of pings can be sent without sending a data frame or header frame)
pub fn http2_max_ping_strikes(self, num: usize) -> ChannelBuilder
[src]
How many misbehaving pings the server can bear before sending goaway and closing the transport? (0 indicates that the server can bear an infinite number of misbehaving pings)
pub fn default_compression_algorithm(
self,
algo: CompressionAlgorithms
) -> ChannelBuilder
[src]
self,
algo: CompressionAlgorithms
) -> ChannelBuilder
Default compression algorithm for the channel.
pub fn default_compression_level(
self,
level: CompressionLevel
) -> ChannelBuilder
[src]
self,
level: CompressionLevel
) -> ChannelBuilder
Default compression level for the channel.
pub fn keepalive_time(self, timeout: Duration) -> ChannelBuilder
[src]
After a duration of this time the client/server pings its peer to see if the transport is still alive.
pub fn keepalive_timeout(self, timeout: Duration) -> ChannelBuilder
[src]
After waiting for a duration of this time, if the keepalive ping sender does not receive the ping ack, it will close the transport.
pub fn keepalive_permit_without_calls(self, allow: bool) -> ChannelBuilder
[src]
Is it permissible to send keepalive pings without any outstanding streams.
pub fn optimize_for(self, target: OptTarget) -> ChannelBuilder
[src]
Optimize a channel.
Default is OptTarget::Blend
.
pub fn build_args(&self) -> ChannelArgs
[src]
Build a channel args from the current configuration.
pub fn connect(self, addr: &str) -> Channel
[src]
Build an insure connection to the address.