Add Get of task and process state

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-07-31 15:56:56 -04:00
parent 2974e485f3
commit 504033e373
13 changed files with 358 additions and 270 deletions

View File

@@ -209,8 +209,8 @@ func (p *initProcess) ExitedAt() time.Time {
return p.exited
}
// ContainerStatus return the state of the container (created, running, paused, stopped)
func (p *initProcess) ContainerStatus(ctx context.Context) (string, error) {
// Status return the state of the container (created, running, paused, stopped)
func (p *initProcess) Status(ctx context.Context) (string, error) {
c, err := p.runtime.State(ctx, p.id)
if err != nil {
return "", p.runtimeError(err, "OCI runtime state failed")
@@ -233,7 +233,7 @@ func (p *initProcess) SetExited(status int) {
}
func (p *initProcess) Delete(context context.Context) error {
status, err := p.ContainerStatus(context)
status, err := p.Status(context)
if err != nil {
return err
}