pub struct Peer {
pub address: Option<Address>,
pub service: String,
pub labels: HashMap<String, String>,
pub principal: String,
pub certificate: String,
}
Expand description
This message defines attributes for a node that handles a network request.
The node can be either a service or an application that sends, forwards,
or receives the request. Service peers should fill in the service
,
principal
, and labels
as appropriate.
[#next-free-field: 6]
Fields§
§address: Option<Address>
The address of the peer, this is typically the IP address. It can also be UDS path, or others.
service: String
The canonical service name of the peer.
It should be set to :ref:the HTTP x-envoy-downstream-service-cluster <config_http_conn_man_headers_downstream-service-cluster>
If a more trusted source of the service name is available through mTLS/secure naming, it
should be used.
labels: HashMap<String, String>
The labels associated with the peer. These could be pod labels for Kubernetes or tags for VMs. The source of the labels could be an X.509 certificate or other configuration.
principal: String
The authenticated identity of this peer.
For example, the identity associated with the workload such as a service account.
If an X.509 certificate is used to assert the identity this field should be sourced from
URI Subject Alternative Names
, DNS Subject Alternate Names
or Subject
in that order.
The primary identity should be the principal. The principal format is issuer specific.
Examples:
- SPIFFE format is
spiffe://trust-domain/path
. - Google account format is
<https://accounts.google.com/{userid}
.>
certificate: String
The X.509 certificate used to authenticate the identify of this peer. When present, the certificate contents are encoded in URL and PEM format.
Trait Implementations§
Source§impl Message for Peer
impl Message for Peer
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 Name for Peer
impl Name for Peer
Source§const NAME: &'static str = "Peer"
const NAME: &'static str = "Peer"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.service.auth.v3"
const PACKAGE: &'static str = "envoy.service.auth.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.impl StructuralPartialEq for Peer
Auto Trait Implementations§
impl Freeze for Peer
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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