pub struct HealthResponse {
pub status: bool,
pub databases: Option<DatabaseStatus>,
pub services: Option<ServiceStatuses>,
pub build_timestamp: String,
pub git_sha: Option<String>,
pub git_commit_timestamp: Option<String>,
pub git_branch: Option<String>,
}Expand description
Response structure for health check endpoints.
This structure can represent both detailed and minimal health check responses. In minimal mode, only the status and build timestamp are included. In detailed mode, additional information about databases, services, and git metadata is included.
Fields§
§status: boolOverall health status of the system.
true indicates all checked components are healthy.
databases: Option<DatabaseStatus>Status of database connections. Omitted in the serialized response if None.
services: Option<ServiceStatuses>Status of external services. Omitted in the serialized response if None.
build_timestamp: StringTimestamp when the application was built.
git_sha: Option<String>Git commit SHA of the deployed version. Omitted in the serialized response if None.
git_commit_timestamp: Option<String>Timestamp of the git commit. Omitted in the serialized response if None.
git_branch: Option<String>Git branch name of the deployed version. Omitted in the serialized response if None.
Implementations§
source§impl HealthResponse
impl HealthResponse
sourcepub fn new(
databases: Option<DatabaseStatus>,
services: Option<ServiceStatuses>,
) -> Self
pub fn new( databases: Option<DatabaseStatus>, services: Option<ServiceStatuses>, ) -> Self
Trait Implementations§
source§impl Debug for HealthResponse
impl Debug for HealthResponse
source§impl Default for HealthResponse
impl Default for HealthResponse
source§fn default() -> HealthResponse
fn default() -> HealthResponse
source§impl<'de> Deserialize<'de> for HealthResponse
impl<'de> Deserialize<'de> for HealthResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for HealthResponse
impl RefUnwindSafe for HealthResponse
impl Send for HealthResponse
impl Sync for HealthResponse
impl Unpin for HealthResponse
impl UnwindSafe for HealthResponse
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more