Add update rpc for resource updates

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-03-07 15:23:52 -08:00
parent 44d6a60e7e
commit 0dd075a47b
7 changed files with 298 additions and 122 deletions

View file

@ -8,8 +8,9 @@ import (
type UpdateTask struct {
baseTask
ID string
State runtime.State
ID string
State runtime.State
Resources *runtime.Resource
}
func (s *Supervisor) updateContainer(t *UpdateTask) error {
@ -41,6 +42,10 @@ func (s *Supervisor) updateContainer(t *UpdateTask) error {
default:
return ErrUnknownContainerStatus
}
return nil
}
if t.Resources != nil {
return container.UpdateResources(t.Resources)
}
return nil
}