pub struct HttpProxy<L> { /* private fields */ }Implementations§
Source§impl HttpProxy<Identity>
impl HttpProxy<Identity>
pub fn new(target_addr: String) -> Self
pub fn with_pool_config(target_addr: String, pool_config: PoolConfig) -> Self
Source§impl<L> HttpProxy<L>
impl<L> HttpProxy<L>
pub fn with_layer<NewL>(self, layer: NewL) -> HttpProxy<NewL>
pub fn handle_stream(&self, stream: VirtualStream)
Sourcepub fn handle_grpc_stream(&self, stream: VirtualStream)
pub fn handle_grpc_stream(&self, stream: VirtualStream)
Serve an incoming gRPC VirtualStream over HTTP/2.
gRPC requires HTTP/2 end-to-end so that trailers (grpc-status,
grpc-message) are propagated correctly. This method uses a
dedicated HTTP/2 connection pool (always acquired via acquire_h2())
to forward requests to the local service.
Trait Implementations§
Auto Trait Implementations§
impl<L> Freeze for HttpProxy<L>where
L: Freeze,
impl<L> !RefUnwindSafe for HttpProxy<L>
impl<L> Send for HttpProxy<L>where
L: Send,
impl<L> Sync for HttpProxy<L>where
L: Sync,
impl<L> Unpin for HttpProxy<L>where
L: Unpin,
impl<L> UnsafeUnpin for HttpProxy<L>where
L: UnsafeUnpin,
impl<L> !UnwindSafe for HttpProxy<L>
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