pub struct NativeHttpService { /* private fields */ }Expand description
A Tower service adapter for eggfetch’s native frame-preserving HTTP path.
This service delegates every request to Client::execute_http_body. It
is always ready to accept a request; origin-aware logical pool admission,
physical connection admission, and transport backpressure happen in the
future returned by tower_service::Service::call. Consequently,
Tower’s readiness-based load-shedding layers do not observe eggfetch pool
saturation. Wrap this service in caller-owned Tower layers when a separate
global concurrency or load-shed policy is needed.
The native path does not apply eggfetch’s high-level redirects, logical retries, cookies, authentication, decompression, or decoded-body limits. Request extensions are not guaranteed to be forwarded to Hyper; middleware may use them before the request reaches this service, but they are not an eggfetch transport contract.
Implementations§
Source§impl NativeHttpService
impl NativeHttpService
Sourcepub fn with_options(self, options: NativeRequestOptions) -> Self
pub fn with_options(self, options: NativeRequestOptions) -> Self
Configure the native transport options used by every service request.
Trait Implementations§
Source§impl Clone for NativeHttpService
impl Clone for NativeHttpService
Source§impl Debug for NativeHttpService
impl Debug for NativeHttpService
Source§impl<B> Service<Request<B>> for NativeHttpService
impl<B> Service<Request<B>> for NativeHttpService
Source§fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Eggfetch admission is origin-aware and requires the request, so it is
performed by the future returned from tower_service::Service::call.
Source§fn call(&mut self, request: Request<B>) -> Self::Future
fn call(&mut self, request: Request<B>) -> Self::Future
Execute one native request through the existing client transport path.