cmd/ctr, service/containers: implement container filter

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-06-21 15:29:58 -07:00
parent 3332042ab6
commit 396d89e423
16 changed files with 409 additions and 189 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"time"
"github.com/containerd/containerd/filters"
"github.com/gogo/protobuf/types"
)
@@ -29,7 +30,10 @@ type RuntimeInfo struct {
type Store interface {
Get(ctx context.Context, id string) (Container, error)
List(ctx context.Context, filter string) ([]Container, error)
// List returns containers that match one or more of the provided filters.
List(ctx context.Context, filters ...filters.Filter) ([]Container, error)
Create(ctx context.Context, container Container) (Container, error)
Update(ctx context.Context, container Container) (Container, error)
Delete(ctx context.Context, id string) error