Struct google_api_proto::google::cloud::servicedirectory::v1::ResolveServiceRequest
source · pub struct ResolveServiceRequest {
pub name: String,
pub max_endpoints: i32,
pub endpoint_filter: String,
}
Expand description
The request message for [LookupService.ResolveService][google.cloud.servicedirectory.v1.LookupService.ResolveService]. Looks up a service by its name, returns the service and its endpoints.
Fields§
§name: String
Required. The name of the service to resolve.
max_endpoints: i32
Optional. The maximum number of endpoints to return. Defaults to 25. Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.
endpoint_filter: String
Optional. The filter applied to the endpoints of the resolved service.
General filter
string syntax:
<field> <operator> <value> (<logical connector>)
<field>
can bename
,address
,port
, orannotations.<key>
for map field<operator>
can be<
,>
,<=
,>=
,!=
,=
,:
. Of which:
meansHAS
, and is roughly the same as=
<value>
must be the same data type as field<logical connector>
can beAND
,OR
,NOT
Examples of valid filters:
annotations.owner
returns endpoints that have a annotation with the keyowner
, this is the same asannotations:owner
annotations.protocol=gRPC
returns endpoints that have key/valueprotocol=gRPC
address=192.108.1.105
returns endpoints that have this addressport>8080
returns endpoints that have port number larger than 8080
name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c
returns endpoints that have name that is alphabetically later than the
string, so “endpoint-e” is returned but “endpoint-a” is not
name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1
returns the endpoint that has an endpoint_id equal to ep-1
annotations.owner!=sd AND annotations.foo=bar
returns endpoints that haveowner
in annotation key but value is notsd
AND have key/valuefoo=bar
doesnotexist.foo=bar
returns an empty list. Note that endpoint doesn’t have a field called “doesnotexist”. Since the filter does not match any endpoint, it returns no results
For more information about filtering, see API Filtering.
Trait Implementations§
source§impl Clone for ResolveServiceRequest
impl Clone for ResolveServiceRequest
source§fn clone(&self) -> ResolveServiceRequest
fn clone(&self) -> ResolveServiceRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResolveServiceRequest
impl Debug for ResolveServiceRequest
source§impl Default for ResolveServiceRequest
impl Default for ResolveServiceRequest
source§impl Message for ResolveServiceRequest
impl Message for ResolveServiceRequest
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 ResolveServiceRequest
impl PartialEq for ResolveServiceRequest
source§fn eq(&self, other: &ResolveServiceRequest) -> bool
fn eq(&self, other: &ResolveServiceRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ResolveServiceRequest
Auto Trait Implementations§
impl Freeze for ResolveServiceRequest
impl RefUnwindSafe for ResolveServiceRequest
impl Send for ResolveServiceRequest
impl Sync for ResolveServiceRequest
impl Unpin for ResolveServiceRequest
impl UnwindSafe for ResolveServiceRequest
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