summaryrefslogtreecommitdiffstats
path: root/src/service.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/service.rs')
-rw-r--r--src/service.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/service.rs b/src/service.rs
index 677db17..bae6867 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -6,7 +6,7 @@ use serde::Deserialize;
use systemd::Systemd;
use tcp::Tcp;
-use crate::{Check, Error};
+use crate::{Error, Status};
pub mod http;
pub mod systemd;
@@ -33,7 +33,7 @@ impl Services {
reqwest::Client::new()
}
- pub async fn check(&self) -> Result<HashMap<String, Check>, Error> {
+ pub async fn check(&self) -> Result<HashMap<String, Status>, Error> {
let checks = self
.inner
.values()
@@ -50,11 +50,11 @@ impl Services {
.collect::<HashMap<_, _>>())
}
- pub async fn check_one(&self, name: &str) -> Option<Result<Check, Error>> {
+ pub async fn check_one(&self, name: &str) -> Option<Result<Status, Error>> {
Some(self.inner.get(name)?.check(self.client.clone()).await)
}
- pub async fn check_filtered<P>(&self, mut predicate: P) -> Result<HashMap<String, Check>, Error>
+ pub async fn check_filtered<P>(&self, mut predicate: P) -> Result<HashMap<String, Status>, Error>
where
P: FnMut(&String) -> bool,
{
@@ -85,7 +85,7 @@ pub enum Service {
}
impl Service {
- pub async fn check(&self, client: reqwest::Client) -> Result<Check, Error> {
+ pub async fn check(&self, client: reqwest::Client) -> Result<Status, Error> {
match self {
Service::Http(http) => http.check(client).await,
Service::Tcp(tcp) => tcp.check().await,