Reference documentation and code samples for the Google API Common Protos Client class Peer.
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 principal
and labels
as appropriate.
Generated from protobuf message google.rpc.context.AttributeContext.Peer
Namespace
Google \ Rpc \ Context \ AttributeContextMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ ip
string
The IP address of the peer.
↳ port
int|string
The network port of the peer.
↳ labels
↳ principal
string
The identity of this peer. Similar to Request.auth.principal
, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
↳ region_code
string
The CLDR country/region code associated with the above IP address. If the IP address is private, the region_code
should reflect the physical location where this peer is running.
getIp
The IP address of the peer.
string
setIp
The IP address of the peer.
var
string
$this
getPort
The network port of the peer.
int|string
setPort
The network port of the peer.
var
int|string
$this
getLabels
The labels associated with the peer.
setLabels
The labels associated with the peer.
$this
getPrincipal
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
identity associated with a load balancer that forwarded the request.
string
setPrincipal
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
identity associated with a load balancer that forwarded the request.
var
string
$this
getRegionCode
The CLDR country/region code associated with the above IP address.
If the IP address is private, the region_code
should reflect the
physical location where this peer is running.
string
setRegionCode
The CLDR country/region code associated with the above IP address.
If the IP address is private, the region_code
should reflect the
physical location where this peer is running.
var
string
$this