Fix update container resources

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-10-03 06:03:39 +00:00
parent 29d9a788e6
commit a81a47bf9b
14 changed files with 324 additions and 52 deletions

View File

@@ -32,8 +32,8 @@ type Container struct {
Metadata
// Status stores the status of the container.
Status StatusStorage
// Containerd container
Container containerd.Container
// Container is the containerd container client.
Container *Client
// Container IO
IO *cio.ContainerIO
// TODO(random-liu): Add stop channel to get rid of stop poll waiting.
@@ -45,7 +45,7 @@ type Opts func(*Container) error
// WithContainer adds the containerd Container to the internal data store.
func WithContainer(cntr containerd.Container) Opts {
return func(c *Container) error {
c.Container = cntr
c.Container = &Client{container: cntr}
return nil
}
}