runtime: remove unnecessary intermediate type, Status
Signed-off-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
parent
1ade1f6d81
commit
167219101f
5 changed files with 11 additions and 20 deletions
|
@ -201,7 +201,7 @@ func (s *apiServer) State(ctx context.Context, r *types.StateRequest) (*types.St
|
|||
Id: c.ID(),
|
||||
BundlePath: c.Path(),
|
||||
Processes: procs,
|
||||
Status: string(c.State().Status),
|
||||
Status: string(c.State()),
|
||||
})
|
||||
}
|
||||
return state, nil
|
||||
|
@ -213,9 +213,7 @@ func (s *apiServer) UpdateContainer(ctx context.Context, r *types.UpdateContaine
|
|||
if r.Signal != 0 {
|
||||
e.Signal = syscall.Signal(r.Signal)
|
||||
}
|
||||
e.State = &runtime.State{
|
||||
Status: runtime.Status(r.Status),
|
||||
}
|
||||
e.State = runtime.State(r.Status)
|
||||
s.sv.SendEvent(e)
|
||||
if err := <-e.Err; err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue