pub enum GrpcTargetAddress {
Tcp(SocketAddr),
Unix(PathBuf),
}Expand description
A gRPC target address.
This represents the address of a gRPC server that can be connected to. GrpcTargetAddress exposes a Display
implementation that emits the target address following the rules of the gRPC Name
Resolution documentation.
Only connection-oriented transports are supported: TCP and Unix domain sockets in SOCK_STREAM mode.
Variants§
Tcp(SocketAddr)
Unix(PathBuf)
Implementations§
Source§impl GrpcTargetAddress
impl GrpcTargetAddress
Sourcepub fn try_from_listen_addr(listen_address: &ListenAddress) -> Option<Self>
pub fn try_from_listen_addr(listen_address: &ListenAddress) -> Option<Self>
Creates a new GrpcTargetAddress from the given ListenAddress.
For TCP addresses, this method converts unspecified addresses (0.0.0.0 or ::) to localhost
(127.0.0.1 or ::1) to ensure the advertised address matches TLS certificates.
Returns None if the listen address is not a connection-oriented transport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GrpcTargetAddress
impl RefUnwindSafe for GrpcTargetAddress
impl Send for GrpcTargetAddress
impl Sync for GrpcTargetAddress
impl Unpin for GrpcTargetAddress
impl UnwindSafe for GrpcTargetAddress
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Stringable for Twhere
T: Display,
impl<T> Stringable for Twhere
T: Display,
Converts the given value to a
SharedString.Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked wrapper. Read moreSource§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked wrapper. Read more