Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoPluginType = errors.New("plugin: no type") ErrNoPluginID = errors.New("plugin: no id") // SkipPlugin is used when a plugin is not initialized and should not be loaded, // this allows the plugin loader differentiate between a plugin which is configured // not to load and one that fails to load. SkipPlugin = errors.New("skip plugin") )
Functions ¶
func IsSkipPlugin ¶
IsSkipPlugin returns true if the error is skipping the plugin
func Register ¶
func Register(r *Registration)
Types ¶
type InitContext ¶
type InitContext struct { Root string State string Address string Context context.Context Config interface{} Events *events.Exchange // contains filtered or unexported fields }
func NewContext ¶
func NewContext(ctx context.Context, plugins map[PluginType]map[string]interface{}, root, state, id string) *InitContext
func (*InitContext) Get ¶
func (i *InitContext) Get(t PluginType) (interface{}, error)
func (*InitContext) GetAll ¶
func (i *InitContext) GetAll(t PluginType) (map[string]interface{}, error)
type PluginType ¶
type PluginType string
const ( RuntimePlugin PluginType = "io.containerd.runtime.v1" GRPCPlugin PluginType = "io.containerd.grpc.v1" SnapshotPlugin PluginType = "io.containerd.snapshotter.v1" TaskMonitorPlugin PluginType = "io.containerd.monitor.v1" DiffPlugin PluginType = "io.containerd.differ.v1" MetadataPlugin PluginType = "io.containerd.metadata.v1" ContentPlugin PluginType = "io.containerd.content.v1" )
type Registration ¶
type Registration struct { Type PluginType ID string Config interface{} Requires []PluginType Init func(*InitContext) (interface{}, error) // contains filtered or unexported fields }
func Graph ¶
func Graph() (ordered []*Registration)
func (*Registration) URI ¶
func (r *Registration) URI() string
Click to show internal directories.
Click to hide internal directories.