diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-03-05 13:57:46 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-03-05 13:57:46 +0100 |
commit | d9d40d450e93c373d0a01ca7eb9904d18750376b (patch) | |
tree | 9b3b48ae60d28bd8c7b7b3e7da2e12721bc136f5 /src/endpoint | |
parent | b818f01f5408c37d1a889b1ad61529321257f56a (diff) |
Add Endpoint::ping()
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/endpoint')
-rw-r--r-- | src/endpoint/configured.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index ba1c54e..68e6e60 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -241,6 +241,11 @@ impl Endpoint { let run_jobs = self.running_jobs() as f64; 100.0 / max_jobs * run_jobs } + + /// Ping the endpoint (once) + pub async fn ping(&self) -> Result<String> { + self.docker.ping().await.map_err(Error::from) + } } pub struct EndpointHandle(Arc<Endpoint>); |