Implement healthcheck for remote client

Previously unimplemented. Works the same way the local one does, except its remote.

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
This commit is contained in:
Ashley Cui
2019-08-19 12:14:54 -04:00
parent c137e8fcf9
commit 8c7014f11d
8 changed files with 31 additions and 19 deletions

View File

@@ -71,10 +71,3 @@ func getSystemSubCommands() []*cobra.Command {
_migrateCommand,
}
}
// Commands that the local client implements
func getHealthcheckSubCommands() []*cobra.Command {
return []*cobra.Command{
_healthcheckrunCommand,
}
}

View File

@@ -47,8 +47,3 @@ func getTrustSubCommands() []*cobra.Command {
func getSystemSubCommands() []*cobra.Command {
return []*cobra.Command{}
}
// Commands that the remoteclient implements
func getHealthcheckSubCommands() []*cobra.Command {
return []*cobra.Command{}
}

View File

@@ -16,11 +16,12 @@ var healthcheckCommand = cliconfig.PodmanCommand{
}
// Commands that are universally implemented
var healthcheckCommands []*cobra.Command
var healthcheckCommands = []*cobra.Command{
_healthcheckrunCommand,
}
func init() {
healthcheckCommand.AddCommand(healthcheckCommands...)
healthcheckCommand.AddCommand(getHealthcheckSubCommands()...)
healthcheckCommand.SetUsageTemplate(UsageTemplate())
rootCmd.AddCommand(healthcheckCommand.Command)
}

View File

@@ -544,6 +544,10 @@ method GetContainersByStatus(status: []string) -> (containerS: []Container)
method Top (nameOrID: string, descriptors: []string) -> (top: []string)
# HealthCheckRun executes defined container's healthcheck command
# and returns the container's health status.
method HealthCheckRun (nameOrID: string) -> (healthCheckStatus: string)
# GetContainer returns information about a single container. If a container
# with the given id doesn't exist, a [ContainerNotFound](#ContainerNotFound)
# error will be returned. See also [ListContainers](ListContainers) and