cmd/ctr, service/containers: implement container filter
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user