Struct google_api_proto::google::cloud::networkservices::v1::endpoint_matcher::MetadataLabelMatcher
source · pub struct MetadataLabelMatcher {
pub metadata_label_match_criteria: i32,
pub metadata_labels: Vec<MetadataLabels>,
}
Expand description
The matcher that is based on node metadata presented by xDS clients.
Fields§
§metadata_label_match_criteria: i32
Specifies how matching should be done.
Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here.
The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has MATCH_ALL <A:1,B:1,C:1>.
If a client with label <A:1> connects, the config from P1 will be selected.
If a client with label <A:1,B:1> connects, the config from P2 will be selected.
If a client with label <A:1,B:1,C:1> connects, the config from P3 will be selected.
If there is more than one best match, (for example, if a config P4 with selector <A:1,D:1> exists and if a client with label <A:1,B:1,D:1> connects), an error will be thrown.
metadata_labels: Vec<MetadataLabels>
The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).
Implementations§
source§impl MetadataLabelMatcher
impl MetadataLabelMatcher
sourcepub fn metadata_label_match_criteria(&self) -> MetadataLabelMatchCriteria
pub fn metadata_label_match_criteria(&self) -> MetadataLabelMatchCriteria
Returns the enum value of metadata_label_match_criteria
, or the default if the field is set to an invalid enum value.
sourcepub fn set_metadata_label_match_criteria(
&mut self,
value: MetadataLabelMatchCriteria,
)
pub fn set_metadata_label_match_criteria( &mut self, value: MetadataLabelMatchCriteria, )
Sets metadata_label_match_criteria
to the provided enum value.
Trait Implementations§
source§impl Clone for MetadataLabelMatcher
impl Clone for MetadataLabelMatcher
source§fn clone(&self) -> MetadataLabelMatcher
fn clone(&self) -> MetadataLabelMatcher
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetadataLabelMatcher
impl Debug for MetadataLabelMatcher
source§impl Default for MetadataLabelMatcher
impl Default for MetadataLabelMatcher
source§impl Message for MetadataLabelMatcher
impl Message for MetadataLabelMatcher
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 MetadataLabelMatcher
impl PartialEq for MetadataLabelMatcher
source§fn eq(&self, other: &MetadataLabelMatcher) -> bool
fn eq(&self, other: &MetadataLabelMatcher) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MetadataLabelMatcher
Auto Trait Implementations§
impl Freeze for MetadataLabelMatcher
impl RefUnwindSafe for MetadataLabelMatcher
impl Send for MetadataLabelMatcher
impl Sync for MetadataLabelMatcher
impl Unpin for MetadataLabelMatcher
impl UnwindSafe for MetadataLabelMatcher
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