func (r *Registration) Init(ic *InitContext) *Plugin {
	p, err := r.InitFn(ic)
	return &Plugin{
		Registration: r,
		Config:       ic.Config,
		Meta:         ic.Meta,
		instance:     p,
		err:          err,
	}
}
Init the registered plugin
package plugin
import (
	"fmt"
	"sync"
	"github.com/containerd/ttrpc"
	"github.com/pkg/errors"
	"google.golang.org/grpc"
)
var (
	ErrNoType = errors.New("plugin: no type")
	ErrNoPluginID = errors.New("plugin: no id")
	ErrIDRegistered = errors.New("plugin: id already registered")
	ErrSkipPlugin = errors.New("skip plugin")
	ErrInvalidRequires = errors.New("invalid requires")
)
func IsSkipPlugin(err error) bool {
	return errors.Is(err, ErrSkipPlugin)
}
type Type string
func (t Type) String() string { return string(t) }
const (
	InternalPlugin Type = "io.containerd.internal.v1"
	RuntimePlugin Type = "io.containerd.runtime.v1"
	RuntimePluginV2 Type = "io.containerd.runtime.v2"
	ServicePlugin Type = "io.containerd.service.v1"
	GRPCPlugin Type = "io.containerd.grpc.v1"
	SnapshotPlugin Type = "io.containerd.snapshotter.v1"
	TaskMonitorPlugin Type = "io.containerd.monitor.v1"
	DiffPlugin Type = "io.containerd.differ.v1"
	MetadataPlugin Type = "io.containerd.metadata.v1"
	ContentPlugin Type = "io.containerd.content.v1"
	GCPlugin Type = "io.containerd.gc.v1"
)
const (
	RuntimeLinuxV1 = "io.containerd.runtime.v1.linux"
	RuntimeRuncV1 = "io.containerd.runc.v1"
	RuntimeRuncV2 = "io.containerd.runc.v2"
)
type Registration struct {
	Type Type
	ID string
	Config interface{}
	Requires []Type
	InitFn func(*InitContext) (interface{}, error)
	Disable bool
}