pub struct Listener {Show 29 fields
pub name: String,
pub address: Option<Address>,
pub stat_prefix: String,
pub filter_chains: Vec<FilterChain>,
pub use_original_dst: Option<bool>,
pub default_filter_chain: Option<FilterChain>,
pub per_connection_buffer_limit_bytes: Option<u32>,
pub metadata: Option<Metadata>,
pub deprecated_v1: Option<DeprecatedV1>,
pub drain_type: i32,
pub listener_filters: Vec<ListenerFilter>,
pub listener_filters_timeout: Option<Duration>,
pub continue_on_listener_filters_timeout: bool,
pub transparent: Option<bool>,
pub freebind: Option<bool>,
pub socket_options: Vec<SocketOption>,
pub tcp_fast_open_queue_length: Option<u32>,
pub traffic_direction: i32,
pub udp_listener_config: Option<UdpListenerConfig>,
pub api_listener: Option<ApiListener>,
pub connection_balance_config: Option<ConnectionBalanceConfig>,
pub reuse_port: bool,
pub enable_reuse_port: Option<bool>,
pub access_log: Vec<AccessLog>,
pub tcp_backlog_size: Option<u32>,
pub bind_to_port: Option<bool>,
pub enable_mptcp: bool,
pub ignore_global_conn_limit: bool,
pub listener_specifier: Option<ListenerSpecifier>,
}
Fields
name: String
address: Option<Address>
stat_prefix: String
filter_chains: Vec<FilterChain>
use_original_dst: Option<bool>
default_filter_chain: Option<FilterChain>
per_connection_buffer_limit_bytes: Option<u32>
metadata: Option<Metadata>
deprecated_v1: Option<DeprecatedV1>
👎Deprecated
drain_type: i32
listener_filters: Vec<ListenerFilter>
listener_filters_timeout: Option<Duration>
continue_on_listener_filters_timeout: bool
transparent: Option<bool>
freebind: Option<bool>
socket_options: Vec<SocketOption>
tcp_fast_open_queue_length: Option<u32>
traffic_direction: i32
udp_listener_config: Option<UdpListenerConfig>
api_listener: Option<ApiListener>
connection_balance_config: Option<ConnectionBalanceConfig>
reuse_port: bool
👎Deprecated
enable_reuse_port: Option<bool>
access_log: Vec<AccessLog>
tcp_backlog_size: Option<u32>
bind_to_port: Option<bool>
enable_mptcp: bool
ignore_global_conn_limit: bool
listener_specifier: Option<ListenerSpecifier>
Implementations
sourceimpl Listener
impl Listener
sourcepub fn drain_type(&self) -> DrainType
pub fn drain_type(&self) -> DrainType
Returns the enum value of drain_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_drain_type(&mut self, value: DrainType)
pub fn set_drain_type(&mut self, value: DrainType)
Sets drain_type
to the provided enum value.
sourcepub fn traffic_direction(&self) -> TrafficDirection
pub fn traffic_direction(&self) -> TrafficDirection
Returns the enum value of traffic_direction
, or the default if the field is set to an invalid enum value.
sourcepub fn set_traffic_direction(&mut self, value: TrafficDirection)
pub fn set_traffic_direction(&mut self, value: TrafficDirection)
Sets traffic_direction
to the provided enum value.
Trait Implementations
sourceimpl Message for Listener
impl Message for Listener
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read moreimpl StructuralPartialEq for Listener
Auto Trait Implementations
impl RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl UnwindSafe for Listener
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request