Generalize the plugin package
Remove containerd specific parts of the plugin package to prepare its move out of the main repository. Separate the plugin registration singleton into a separate package. Separating out the plugin package and registration makes it easier to implement external plugins without creating a dependency loop. Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
		| @@ -29,6 +29,7 @@ import ( | ||||
| 	"github.com/containerd/containerd/mount" | ||||
| 	"github.com/containerd/containerd/platforms" | ||||
| 	"github.com/containerd/containerd/plugin" | ||||
| 	"github.com/containerd/containerd/plugin/registry" | ||||
| 	"github.com/containerd/containerd/plugins" | ||||
| 	"github.com/containerd/containerd/runtime" | ||||
| 	v2 "github.com/containerd/containerd/runtime/v2" | ||||
| @@ -39,7 +40,7 @@ import ( | ||||
| ) | ||||
|  | ||||
| func init() { | ||||
| 	plugin.Register(&plugin.Registration{ | ||||
| 	registry.Register(&plugin.Registration{ | ||||
| 		Type: plugins.SandboxControllerPlugin, | ||||
| 		ID:   "local", | ||||
| 		Requires: []plugin.Type{ | ||||
|   | ||||
| @@ -19,11 +19,12 @@ package sandbox | ||||
| import ( | ||||
| 	"github.com/containerd/containerd/metadata" | ||||
| 	"github.com/containerd/containerd/plugin" | ||||
| 	"github.com/containerd/containerd/plugin/registry" | ||||
| 	"github.com/containerd/containerd/plugins" | ||||
| ) | ||||
|  | ||||
| func init() { | ||||
| 	plugin.Register(&plugin.Registration{ | ||||
| 	registry.Register(&plugin.Registration{ | ||||
| 		Type: plugins.SandboxStorePlugin, | ||||
| 		ID:   "local", | ||||
| 		Requires: []plugin.Type{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Derek McGowan
					Derek McGowan