Setup plugin ids and dependencies
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -20,11 +20,11 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
plugin.Register("snapshot-btrfs", &plugin.Registration{
|
||||
plugin.Register(&plugin.Registration{
|
||||
ID: "btrfs",
|
||||
Type: plugin.SnapshotPlugin,
|
||||
Init: func(ic *plugin.InitContext) (interface{}, error) {
|
||||
root := filepath.Join(ic.Root, "snapshot", "btrfs")
|
||||
return NewSnapshotter(root)
|
||||
return NewSnapshotter(ic.Root)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -16,10 +16,11 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
plugin.Register("snapshot-naive", &plugin.Registration{
|
||||
plugin.Register(&plugin.Registration{
|
||||
Type: plugin.SnapshotPlugin,
|
||||
ID: "naive",
|
||||
Init: func(ic *plugin.InitContext) (interface{}, error) {
|
||||
return NewSnapshotter(filepath.Join(ic.Root, "snapshot", "naive"))
|
||||
return NewSnapshotter(ic.Root)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -20,10 +20,11 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
plugin.Register("snapshot-overlay", &plugin.Registration{
|
||||
plugin.Register(&plugin.Registration{
|
||||
Type: plugin.SnapshotPlugin,
|
||||
ID: "overlayfs",
|
||||
Init: func(ic *plugin.InitContext) (interface{}, error) {
|
||||
return NewSnapshotter(filepath.Join(ic.Root, "snapshot", "overlay"))
|
||||
return NewSnapshotter(ic.Root)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ package windows
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
@@ -17,10 +16,11 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
plugin.Register("snapshot-windows", &plugin.Registration{
|
||||
plugin.Register(&plugin.Registration{
|
||||
Type: plugin.SnapshotPlugin,
|
||||
ID: "windows",
|
||||
Init: func(ic *plugin.InitContext) (interface{}, error) {
|
||||
return NewSnapshotter(filepath.Join(ic.Root, "snapshot", "windows"))
|
||||
return NewSnapshotter(ic.Root)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user