Move plugin type definitions to containerd plugins package
The plugins packages defines the plugins used by containerd. Move all the types and properties to this package. Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/containerd/containerd/metadata"
|
||||
"github.com/containerd/containerd/pkg/timeout"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
"github.com/containerd/containerd/plugins"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
"github.com/containerd/log"
|
||||
|
||||
@@ -82,12 +83,12 @@ func (bc *BoltConfig) Validate() error {
|
||||
|
||||
func init() {
|
||||
plugin.Register(&plugin.Registration{
|
||||
Type: plugin.MetadataPlugin,
|
||||
Type: plugins.MetadataPlugin,
|
||||
ID: "bolt",
|
||||
Requires: []plugin.Type{
|
||||
plugin.ContentPlugin,
|
||||
plugin.EventPlugin,
|
||||
plugin.SnapshotPlugin,
|
||||
plugins.ContentPlugin,
|
||||
plugins.EventPlugin,
|
||||
plugins.SnapshotPlugin,
|
||||
},
|
||||
Config: &BoltConfig{
|
||||
ContentSharingPolicy: SharingPolicyShared,
|
||||
@@ -96,12 +97,12 @@ func init() {
|
||||
if err := os.MkdirAll(ic.Root, 0711); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs, err := ic.Get(plugin.ContentPlugin)
|
||||
cs, err := ic.Get(plugins.ContentPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
snapshottersRaw, err := ic.GetByType(plugin.SnapshotPlugin)
|
||||
snapshottersRaw, err := ic.GetByType(plugins.SnapshotPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -119,7 +120,7 @@ func init() {
|
||||
snapshotters[name] = sn.(snapshots.Snapshotter)
|
||||
}
|
||||
|
||||
ep, err := ic.Get(plugin.EventPlugin)
|
||||
ep, err := ic.Get(plugins.EventPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user