pub struct Upstream<'a>(pub Cow<'a, [u8]>);
Expand description
A reference to an upstream cluster. In envoy this is an encoded protobuf. See Upstream::envoy_upstream
.
Tuple Fields§
§0: Cow<'a, [u8]>
Implementations§
Source§impl<'a> Upstream<'a>
impl<'a> Upstream<'a>
Sourcepub fn envoy_upstream(
cluster_name: impl ToString,
authority: impl ToString,
) -> Self
pub fn envoy_upstream( cluster_name: impl ToString, authority: impl ToString, ) -> Self
Creates an Envoy-compatible upstream configuration for the given upstream cluster name
Sourcepub fn insecure_grpc_upstream(target_uri: impl ToString) -> Self
pub fn insecure_grpc_upstream(target_uri: impl ToString) -> Self
like grpc_upstream, but without TLS. used for testing purposes
pub fn grpc_upstream(target_uri: impl ToString) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Upstream<'a>
impl<'a> RefUnwindSafe for Upstream<'a>
impl<'a> Send for Upstream<'a>
impl<'a> Sync for Upstream<'a>
impl<'a> Unpin for Upstream<'a>
impl<'a> UnwindSafe for Upstream<'a>
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