Struct pingora_core::apps::http_app::HttpServer
source · pub struct HttpServer<SV> { /* private fields */ }Expand description
A helper struct for HTTP server with http modules embedded
Implementations§
source§impl<SV> HttpServer<SV>
impl<SV> HttpServer<SV>
sourcepub fn new_app(app: SV) -> Self
pub fn new_app(app: SV) -> Self
Create a new HttpServer with the given app which implements ServeHttp
sourcepub fn add_module(&mut self, module: ModuleBuilder)
pub fn add_module(&mut self, module: ModuleBuilder)
Add ModuleBuilder to this HttpServer
Trait Implementations§
source§impl<SV> HttpServerApp for HttpServer<SV>
impl<SV> HttpServerApp for HttpServer<SV>
source§fn process_new_http<'life0, 'life1, 'async_trait>(
self: &'life0 Arc<Self>,
http: ServerSession,
shutdown: &'life1 ShutdownWatch
) -> Pin<Box<dyn Future<Output = Option<Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_new_http<'life0, 'life1, 'async_trait>(
self: &'life0 Arc<Self>,
http: ServerSession,
shutdown: &'life1 ShutdownWatch
) -> Pin<Box<dyn Future<Output = Option<Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§fn h2_options(&self) -> Option<H2Options>
fn h2_options(&self) -> Option<H2Options>
Provide options on how HTTP/2 connection should be established. This function will be called
every time a new HTTP/2 connection needs to be established. Read more
fn http_cleanup<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<SV> !Freeze for HttpServer<SV>
impl<SV> !RefUnwindSafe for HttpServer<SV>
impl<SV> Send for HttpServer<SV>where
SV: Send,
impl<SV> Sync for HttpServer<SV>where
SV: Sync,
impl<SV> Unpin for HttpServer<SV>where
SV: Unpin,
impl<SV> !UnwindSafe for HttpServer<SV>
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