pub struct HttpServer { /* private fields */ }Expand description
Minimal server-side shape for standard platform health and readiness endpoints.
This type is intentionally thin: it carries shared readiness state and provides optional integration with HTTP server frameworks via feature-gated adapters.
§Contracts
- The readiness latch returned by
HttpServer::readinessis the single source of truth. - Paths are stored as
&'static strto keep the type lightweight and allocation-free.
Implementations§
Source§impl HttpServer
impl HttpServer
Sourcepub fn healthz_path(&self) -> &'static str
pub fn healthz_path(&self) -> &'static str
Get the configured path for the health endpoint.
Sourcepub fn readyz_path(&self) -> &'static str
pub fn readyz_path(&self) -> &'static str
Get the configured path for the readiness endpoint.
Sourcepub fn healthcheck(&self) -> Result<()>
pub fn healthcheck(&self) -> Result<()>
Small smoke-check hook that always succeeds for now.
Intended to evolve into optional trait-based checks, while keeping the default lightweight.
Errors: reserved for future expansions; currently always returns Ok(()).
Trait Implementations§
Source§impl Clone for HttpServer
impl Clone for HttpServer
Source§fn clone(&self) -> HttpServer
fn clone(&self) -> HttpServer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpServer
impl Debug for HttpServer
Source§impl Default for HttpServer
impl Default for HttpServer
Source§fn default() -> HttpServer
fn default() -> HttpServer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpServer
impl RefUnwindSafe for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl UnwindSafe for HttpServer
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