pub struct GatewayProxy { /* private fields */ }Expand description
An HTTP reverse proxy backed by a GatewayRouter.
Implementations§
Source§impl GatewayProxy
impl GatewayProxy
pub fn new(router: GatewayRouter) -> Self
pub fn with_client(self, client: Client) -> Self
pub fn with_request_body_limit(self, bytes: usize) -> Self
pub fn with_response_body_limit(self, bytes: usize) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sourcepub fn with_upstream_middleware<M>(
self,
name: impl Into<String>,
middleware: M,
) -> Result<Self, GatewayConfigError>where
M: GatewayMiddleware,
pub fn with_upstream_middleware<M>(
self,
name: impl Into<String>,
middleware: M,
) -> Result<Self, GatewayConfigError>where
M: GatewayMiddleware,
Registers a named policy referenced by one or more configured upstream pools.
pub fn router(&self) -> &GatewayRouter
pub async fn forward( &self, request: HttpRequest, payload: Payload, ) -> HttpResponse
Trait Implementations§
Source§impl Clone for GatewayProxy
impl Clone for GatewayProxy
Source§fn clone(&self) -> GatewayProxy
fn clone(&self) -> GatewayProxy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for GatewayProxy
impl !UnwindSafe for GatewayProxy
impl Freeze for GatewayProxy
impl Send for GatewayProxy
impl Sync for GatewayProxy
impl Unpin for GatewayProxy
impl UnsafeUnpin for GatewayProxy
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> 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>
Wrap the input message
T in a tonic::Request