Struct sozu_lib::testing::ServerConfig
source · pub struct ServerConfig {Show 17 fields
pub max_connections: u64,
pub front_timeout: u32,
pub back_timeout: u32,
pub connect_timeout: u32,
pub zombie_check_interval: u32,
pub accept_queue_timeout: u32,
pub min_buffers: u64,
pub max_buffers: u64,
pub buffer_size: u64,
pub log_level: String,
pub log_target: String,
pub access_logs_target: Option<String>,
pub command_buffer_size: u64,
pub max_command_buffer_size: u64,
pub metrics: Option<ServerMetricsConfig>,
pub access_log_format: i32,
pub log_colored: bool,
}
Expand description
Used by a worker to start its server loop. The defaults should match those of the config module
Fields§
§max_connections: u64
§front_timeout: u32
§back_timeout: u32
§connect_timeout: u32
§zombie_check_interval: u32
§accept_queue_timeout: u32
§min_buffers: u64
§max_buffers: u64
§buffer_size: u64
§log_level: String
§log_target: String
§access_logs_target: Option<String>
§command_buffer_size: u64
§max_command_buffer_size: u64
§metrics: Option<ServerMetricsConfig>
§access_log_format: i32
§log_colored: bool
Implementations§
source§impl ServerConfig
impl ServerConfig
sourcepub fn slab_capacity(&self) -> u64
pub fn slab_capacity(&self) -> u64
size of the slab for the Session manager
source§impl ServerConfig
impl ServerConfig
sourcepub fn access_logs_target(&self) -> &str
pub fn access_logs_target(&self) -> &str
Returns the value of access_logs_target
, or the default value if access_logs_target
is unset.
sourcepub fn access_log_format(&self) -> ProtobufAccessLogFormat
pub fn access_log_format(&self) -> ProtobufAccessLogFormat
Returns the enum value of access_log_format
, or the default if the field is set to an invalid enum value.
sourcepub fn set_access_log_format(&mut self, value: ProtobufAccessLogFormat)
pub fn set_access_log_format(&mut self, value: ProtobufAccessLogFormat)
Sets access_log_format
to the provided enum value.
Trait Implementations§
source§impl Clone for ServerConfig
impl Clone for ServerConfig
source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a copy 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 moresource§impl Debug for ServerConfig
impl Debug for ServerConfig
source§impl Default for ServerConfig
impl Default for ServerConfig
source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ServerConfig
impl<'de> Deserialize<'de> for ServerConfig
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ServerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ServerConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&Config> for ServerConfig
impl From<&Config> for ServerConfig
reduce the config to the bare minimum needed by a worker
source§fn from(config: &Config) -> ServerConfig
fn from(config: &Config) -> ServerConfig
Converts to this type from the input type.
source§impl Hash for ServerConfig
impl Hash for ServerConfig
source§impl Message for ServerConfig
impl Message for ServerConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl Ord for ServerConfig
impl Ord for ServerConfig
source§fn cmp(&self, other: &ServerConfig) -> Ordering
fn cmp(&self, other: &ServerConfig) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
source§fn eq(&self, other: &ServerConfig) -> bool
fn eq(&self, other: &ServerConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ServerConfig
impl PartialOrd for ServerConfig
source§fn partial_cmp(&self, other: &ServerConfig) -> Option<Ordering>
fn partial_cmp(&self, other: &ServerConfig) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ServerConfig
impl Serialize for ServerConfig
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ServerConfig
impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.