Struct google_api_proto::google::cloud::compute::v1::BackendServiceLogConfig
source · pub struct BackendServiceLogConfig {
pub enable: Option<bool>,
pub optional_fields: Vec<String>,
pub optional_mode: Option<String>,
pub sample_rate: Option<f32>,
}
Expand description
The available logging options for the load balancer traffic served by this backend service.
Fields§
§enable: Option<bool>
Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
optional_fields: Vec<String>
This field can only be specified if logging is enabled for this backend service and “logConfig.optionalMode” was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
optional_mode: Option<String>
This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. Check the OptionalMode enum for the list of possible values.
sample_rate: Option<f32>
This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
Implementations§
source§impl BackendServiceLogConfig
impl BackendServiceLogConfig
sourcepub fn optional_mode(&self) -> &str
pub fn optional_mode(&self) -> &str
Returns the value of optional_mode
, or the default value if optional_mode
is unset.
sourcepub fn sample_rate(&self) -> f32
pub fn sample_rate(&self) -> f32
Returns the value of sample_rate
, or the default value if sample_rate
is unset.
Trait Implementations§
source§impl Clone for BackendServiceLogConfig
impl Clone for BackendServiceLogConfig
source§fn clone(&self) -> BackendServiceLogConfig
fn clone(&self) -> BackendServiceLogConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BackendServiceLogConfig
impl Debug for BackendServiceLogConfig
source§impl Default for BackendServiceLogConfig
impl Default for BackendServiceLogConfig
source§impl Message for BackendServiceLogConfig
impl Message for BackendServiceLogConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BackendServiceLogConfig
impl PartialEq for BackendServiceLogConfig
source§fn eq(&self, other: &BackendServiceLogConfig) -> bool
fn eq(&self, other: &BackendServiceLogConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BackendServiceLogConfig
Auto Trait Implementations§
impl Freeze for BackendServiceLogConfig
impl RefUnwindSafe for BackendServiceLogConfig
impl Send for BackendServiceLogConfig
impl Sync for BackendServiceLogConfig
impl Unpin for BackendServiceLogConfig
impl UnwindSafe for BackendServiceLogConfig
Blanket Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request