Versions in this module Expand all Collapse all v0 v0.1.0 Nov 1, 2023 Changes in this version + var ErrIDRegistered = errors.New("plugin: id already registered") + var ErrInvalidRequires = errors.New("invalid requires") + var ErrNoPluginID = errors.New("plugin: no id") + var ErrNoType = errors.New("plugin: no type") + var ErrPluginInitialized = errors.New("plugin: already initialized") + var ErrPluginMultipleInstances = errors.New("plugin: multiple instances") + var ErrPluginNotFound = errors.New("plugin: not found") + var ErrSkipPlugin = errors.New("skip plugin") + func IsSkipPlugin(err error) bool + type DisableFilter func(r *Registration) bool + type InitContext struct + Config interface{} + Context context.Context + Meta *Meta + Properties map[string]string + RegisterReadiness func() func() + func NewContext(ctx context.Context, plugins *Set, properties map[string]string) *InitContext + func (i *InitContext) GetAll() []*Plugin + func (i *InitContext) GetByID(t Type, id string) (interface{}, error) + func (i *InitContext) GetByType(t Type) (map[string]interface{}, error) + func (i *InitContext) GetSingle(t Type) (interface{}, error) + func (i *InitContext) Plugins() *Set + type Meta struct + Capabilities []string + Exports map[string]string + Platforms []imagespec.Platform + type Plugin struct + Config interface{} + Meta Meta + Registration Registration + func (p *Plugin) Err() error + func (p *Plugin) Instance() (interface{}, error) + type Registration struct + Config interface{} + ConfigMigration func(context.Context, int, map[string]interface{}) error + ID string + InitFn func(*InitContext) (interface{}, error) + Requires []Type + Type Type + func (r *Registration) URI() string + func (r Registration) Init(ic *InitContext) *Plugin + type Registry []*Registration + func (registry Registry) Graph(filter DisableFilter) []Registration + func (registry Registry) Register(r *Registration) Registry + type Set struct + func NewPluginSet() *Set + func (ps *Set) Add(p *Plugin) error + func (ps *Set) Get(t Type, id string) *Plugin + func (ps *Set) GetAll() []*Plugin + type Type string + func (t Type) String() string