diff options
Diffstat (limited to 'src/endpoint')
-rw-r--r-- | src/endpoint/configured.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index 454850d..ae54dfb 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -272,6 +272,17 @@ impl Endpoint { .collect() }) } + + pub async fn has_container_with_id(&self, id: &str) -> Result<bool> { + self.container_stats() + .await? + .iter() + .find(|st| st.id == id) + .map(Ok) + .transpose() + .map(|o| o.is_some()) + } + } /// Helper type to store endpoint statistics |