murgamu 0.7.3

Murgamü is an NestJS-inspired web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::middleware::health::indicator_result::MurHealthIndicatorResult;
use std::future::Future;
use std::pin::Pin;
use std::time::Duration;

pub trait MurHealthIndicator: Send + Sync + 'static {
	fn check(&self) -> Pin<Box<dyn Future<Output = MurHealthIndicatorResult> + Send + '_>>;

	fn name(&self) -> &str {
		std::any::type_name::<Self>()
	}

	fn timeout(&self) -> Duration {
		Duration::from_secs(5)
	}
}