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:
@@ -41,6 +41,7 @@ import (
|
||||
"github.com/containerd/containerd/pkg/rdt"
|
||||
"github.com/containerd/containerd/pkg/timeout"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
"github.com/containerd/containerd/plugins"
|
||||
"github.com/containerd/containerd/protobuf"
|
||||
"github.com/containerd/containerd/protobuf/proto"
|
||||
ptypes "github.com/containerd/containerd/protobuf/types"
|
||||
@@ -75,7 +76,7 @@ type Config struct {
|
||||
|
||||
func init() {
|
||||
plugin.Register(&plugin.Registration{
|
||||
Type: plugin.ServicePlugin,
|
||||
Type: plugins.ServicePlugin,
|
||||
ID: services.TasksService,
|
||||
Requires: tasksServiceRequires,
|
||||
Config: &Config{},
|
||||
@@ -88,22 +89,22 @@ func init() {
|
||||
func initFunc(ic *plugin.InitContext) (interface{}, error) {
|
||||
config := ic.Config.(*Config)
|
||||
|
||||
v2r, err := ic.GetByID(plugin.RuntimePluginV2, "task")
|
||||
v2r, err := ic.GetByID(plugins.RuntimePluginV2, "task")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
m, err := ic.Get(plugin.MetadataPlugin)
|
||||
m, err := ic.Get(plugins.MetadataPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ep, err := ic.Get(plugin.EventPlugin)
|
||||
ep, err := ic.Get(plugins.EventPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
monitor, err := ic.Get(plugin.TaskMonitorPlugin)
|
||||
monitor, err := ic.Get(plugins.TaskMonitorPlugin)
|
||||
if err != nil {
|
||||
if !errdefs.IsNotFound(err) {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user