Documentation ¶
Index ¶
- type ErrAmbiguous
- type ErrNotFound
- type Store
- func (ps *Store) Add(p *v2.Plugin) error
- func (ps *Store) CallHandler(p *v2.Plugin)
- func (ps *Store) Get(name, capability string, mode int) (plugingetter.CompatPlugin, error)
- func (ps *Store) GetAll() map[string]*v2.Plugin
- func (ps *Store) GetAllByCap(capability string) ([]plugingetter.CompatPlugin, error)
- func (ps *Store) GetByID(id string) (*v2.Plugin, error)
- func (ps *Store) GetByName(name string) (*v2.Plugin, error)
- func (ps *Store) Handle(capability string, callback func(string, *plugins.Client))
- func (ps *Store) Remove(p *v2.Plugin)
- func (ps *Store) Search(partialID string) (*v2.Plugin, error)
- func (ps *Store) SetAll(plugins map[string]*v2.Plugin)
- func (ps *Store) SetState(p *v2.Plugin, state bool)
- func (ps *Store) Update(p *v2.Plugin)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrAmbiguous ¶
type ErrAmbiguous string
ErrAmbiguous indicates that a plugin was not found locally.
func (ErrAmbiguous) Error ¶
func (name ErrAmbiguous) Error() string
type ErrNotFound ¶
type ErrNotFound string
ErrNotFound indicates that a plugin was not found locally.
func (ErrNotFound) Error ¶
func (name ErrNotFound) Error() string
type Store ¶
Store manages the plugin inventory in memory and on-disk
func (*Store) Add ¶
Add adds a plugin to memory and plugindb. An error will be returned if there is a collision.
func (*Store) CallHandler ¶
CallHandler calls the registered callback. It is invoked during plugin enable.
func (*Store) Get ¶
func (ps *Store) Get(name, capability string, mode int) (plugingetter.CompatPlugin, error)
Get returns an enabled plugin matching the given name and capability.
func (*Store) GetAllByCap ¶
func (ps *Store) GetAllByCap(capability string) ([]plugingetter.CompatPlugin, error)
GetAllByCap returns a list of enabled plugins matching the given capability.
func (*Store) Handle ¶
Handle sets a callback for a given capability. It is only used by network and ipam drivers during plugin registration. The callback registers the driver with the subsystem (network, ipam).
func (*Store) Search ¶
Search retreives a plugin by ID Prefix If no plugin is found, then ErrNotFound is returned If multiple plugins are found, then ErrAmbiguous is returned