watchctl 0.4.0

Process supervisor with wait, watch, and retry phases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod file;
mod http;
mod tcp;

pub use file::FileCheck;
pub use http::{HttpCheck, build_http_client};
pub use tcp::TcpCheck;

use std::future::Future;
use std::pin::Pin;

pub type CheckFuture<'a> = Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'a>>;

pub trait Check: Send + Sync {
    fn check(&self) -> CheckFuture<'_>;
    fn description(&self) -> &str;
}