murgamu 0.7.4

A NestJS-inspired web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::middleware::health::indicator::MurHealthIndicator;
use crate::middleware::health::indicator_result::MurHealthIndicatorResult;
use std::future::Future;
use std::pin::Pin;

#[derive(Debug, Clone, Default)]
pub struct MurAlwaysHealthyIndicator;

impl MurHealthIndicator for MurAlwaysHealthyIndicator {
	fn check(&self) -> Pin<Box<dyn Future<Output = MurHealthIndicatorResult> + Send + '_>> {
		Box::pin(async { MurHealthIndicatorResult::healthy() })
	}

	fn name(&self) -> &str {
		"liveness"
	}
}