From 1a1cb138eb81709ed071aa4745d8079413f76160 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 5 Mar 2021 13:58:33 +0100 Subject: Add subcommand "endpoint ping" This is the first "endpoint" subcommand implementation, which adds a "ping" subcommand, that can be used to ping all endpoints. This is the first step towards a CLI interface for endpoint maintenance commands. "ping" is the least complex one to implement and the docker crate ("shiplift") offers that functionality where one can ping the docker endpoints for availability, thus this is chosen as first implementation. Later, container cleanup and so on will be added as well, based on this work. Signed-off-by: Matthias Beyer --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index b43a401..4cad4ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -184,6 +184,8 @@ async fn main() -> Result<()> { crate::commands::tree_of(matches, repo, progressbars).await? } + Some(("endpoint", matches)) => crate::commands::endpoint(matches, &config, progressbars).await?, + Some((other, _)) => return Err(anyhow!("Unknown subcommand: {}", other)), None => return Err(anyhow!("No subcommand")), } -- cgit v1.2.3