package plugin
import "github.com/containerd/containerd/plugin"
Index ¶
- Variables
- func IsSkipPlugin(err error) bool
- func Load(path string) (err error)
- func Register(r *Registration)
- type Differ
- type InitContext
- func NewContext(ctx context.Context, plugins map[PluginType]map[string]interface{}, root, state, id string) *InitContext
- func (i *InitContext) Get(t PluginType) (interface{}, error)
- func (i *InitContext) GetAll(t PluginType) (map[string]interface{}, error)
- type PluginType
- type Registration
- type Service
Variables ¶
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 Load ¶
Load loads all plugins at the provided path into containerd
func Register ¶
func Register(r *Registration)
Types ¶
type Differ ¶
type Differ interface { Apply(ctx context.Context, desc ocispec.Descriptor, mount []mount.Mount) (ocispec.Descriptor, error) DiffMounts(ctx context.Context, lower, upper []mount.Mount, media, ref string) (ocispec.Descriptor, error) }
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
type Service ¶
Source Files ¶
context.go differ.go plugin.go plugin_go18.go
- Version
- v1.0.0-alpha5
- Published
- Aug 17, 2017
- Platform
- darwin/amd64
- Imports
- 13 packages
- Last checked
- 21 seconds ago –
Tools for package owners.