Add namespaced snapshotter implementation

The namespaced snapshotter wraps an existing snapshotter and
enforces namespace.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-06-21 15:51:16 -07:00
parent 7ddf411ea8
commit 4ba4f3a1d5
6 changed files with 342 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/plugin"
"github.com/containerd/containerd/snapshot"
"github.com/containerd/containerd/snapshot/namespaced"
protoempty "github.com/golang/protobuf/ptypes/empty"
"golang.org/x/net/context"
"google.golang.org/grpc"
@@ -44,7 +45,7 @@ type service struct {
func newService(snapshotter snapshot.Snapshotter, evts events.Poster) (*service, error) {
return &service{
snapshotter: snapshotter,
snapshotter: namespaced.NewSnapshotter(snapshotter),
emitter: evts,
}, nil
}