rename snapshot->snapshots pkg

Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
This commit is contained in:
Jess Valarezo
2017-11-22 15:53:16 -05:00
parent 61c8fe2307
commit 9885edfc44
39 changed files with 367 additions and 367 deletions

View File

@@ -21,8 +21,8 @@ import (
"github.com/containerd/containerd/gc"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/snapshot"
"github.com/containerd/containerd/snapshot/naive"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/naive"
"github.com/gogo/protobuf/types"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
@@ -377,7 +377,7 @@ type object struct {
labels map[string]string
}
func create(obj object, tx *bolt.Tx, cs content.Store, sn snapshot.Snapshotter) (*gc.Node, error) {
func create(obj object, tx *bolt.Tx, cs content.Store, sn snapshots.Snapshotter) (*gc.Node, error) {
var (
node *gc.Node
namespace = "test"
@@ -408,7 +408,7 @@ func create(obj object, tx *bolt.Tx, cs content.Store, sn snapshot.Snapshotter)
case testSnapshot:
ctx := WithTransactionContext(ctx, tx)
if v.active {
_, err := sn.Prepare(ctx, v.key, v.parent, snapshot.WithLabels(obj.labels))
_, err := sn.Prepare(ctx, v.key, v.parent, snapshots.WithLabels(obj.labels))
if err != nil {
return nil, err
}
@@ -418,7 +418,7 @@ func create(obj object, tx *bolt.Tx, cs content.Store, sn snapshot.Snapshotter)
if err != nil {
return nil, err
}
if err := sn.Commit(ctx, v.key, akey, snapshot.WithLabels(obj.labels)); err != nil {
if err := sn.Commit(ctx, v.key, akey, snapshots.WithLabels(obj.labels)); err != nil {
return nil, err
}
}
@@ -528,7 +528,7 @@ type testContainer struct {
snapshot string
}
func newStores(t testing.TB) (*DB, content.Store, snapshot.Snapshotter, func()) {
func newStores(t testing.TB) (*DB, content.Store, snapshots.Snapshotter, func()) {
td, err := ioutil.TempDir("", "gc-test-")
if err != nil {
t.Fatal(err)
@@ -548,7 +548,7 @@ func newStores(t testing.TB) (*DB, content.Store, snapshot.Snapshotter, func())
t.Fatal(err)
}
mdb := NewDB(db, lcs, map[string]snapshot.Snapshotter{"naive": nsn})
mdb := NewDB(db, lcs, map[string]snapshots.Snapshotter{"naive": nsn})
return mdb, mdb.ContentStore(), mdb.Snapshotter("naive"), func() {
os.RemoveAll(td)