Use new container update function

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-10-06 01:41:03 +00:00
parent f7eaa29c67
commit e78c85f76b
15 changed files with 64 additions and 117 deletions

View File

@@ -33,7 +33,7 @@ type Container struct {
// Status stores the status of the container.
Status StatusStorage
// Container is the containerd container client.
Container *Client
Container containerd.Container
// 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 = &Client{container: cntr}
c.Container = cntr
return nil
}
}
@@ -95,10 +95,6 @@ type Store struct {
// TODO(random-liu): Add trunc index.
}
// LoadStore loads containers from runtime.
// TODO(random-liu): Implement LoadStore.
func LoadStore() *Store { return nil }
// NewStore creates a container store.
func NewStore() *Store {
return &Store{containers: make(map[string]Container)}