Add Status in runtime interface and use it for runtime health check.

This commit is contained in:
Random-Liu
2016-03-03 02:01:15 -08:00
parent 7215860ecd
commit 07b21c50fa
10 changed files with 191 additions and 280 deletions

View File

@@ -57,7 +57,10 @@ type Runtime interface {
Version() (Version, error)
// APIVersion returns the API version information of the container
// runtime. This may be different from the runtime engine's version.
// TODO(random-liu): We should fold this into Version()
APIVersion() (Version, error)
// Status returns error if the runtime is unhealthy; nil otherwise.
Status() error
// GetPods returns a list containers group by pods. The boolean parameter
// specifies whether the runtime returns all containers including those already
// exited and dead containers (used for garbage collection).