mirror of
https://github.com/containers/podman.git
synced 2025-12-04 20:28:40 +08:00
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:
@@ -71,10 +71,3 @@ func getSystemSubCommands() []*cobra.Command {
|
||||
_migrateCommand,
|
||||
}
|
||||
}
|
||||
|
||||
// Commands that the local client implements
|
||||
func getHealthcheckSubCommands() []*cobra.Command {
|
||||
return []*cobra.Command{
|
||||
_healthcheckrunCommand,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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{}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user