Documentation ¶
Index ¶
- func Init(root string, ps *store.Store, remote libcontainerd.Remote, rs registry.Service, ...) (err error)
- type Manager
- func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.Reader, options *types.PluginCreateOptions) error
- func (pm *Manager) Disable(name string) error
- func (pm *Manager) Enable(name string, config *types.PluginEnableConfig) error
- func (pm *Manager) Inspect(refOrID string) (tp types.Plugin, err error)
- func (pm *Manager) List() ([]types.Plugin, error)
- func (pm *Manager) Privileges(name string, metaHeader http.Header, authConfig *types.AuthConfig) (types.PluginPrivileges, error)
- func (pm *Manager) Pull(name string, metaHeader http.Header, authConfig *types.AuthConfig, ...) (err error)
- func (pm *Manager) Push(name string, metaHeader http.Header, authConfig *types.AuthConfig) error
- func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error
- func (pm *Manager) Set(name string, args []string) error
- func (pm *Manager) Shutdown()
- func (pm *Manager) StateChanged(id string, e libcontainerd.StateInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager controls the plugin subsystem.
func (*Manager) CreateFromContext ¶
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.Reader, options *types.PluginCreateOptions) error
CreateFromContext creates a plugin from the given pluginDir which contains both the rootfs and the config.json and a repoName with optional tag.
func (*Manager) Disable ¶
Disable deactivates a plugin, which implies that they cannot be used by containers.
func (*Manager) Enable ¶
func (pm *Manager) Enable(name string, config *types.PluginEnableConfig) error
Enable activates a plugin, which implies that they are ready to be used by containers.
func (*Manager) Privileges ¶
func (pm *Manager) Privileges(name string, metaHeader http.Header, authConfig *types.AuthConfig) (types.PluginPrivileges, error)
Privileges pulls a plugin config and computes the privileges required to install it.
func (*Manager) Pull ¶
func (pm *Manager) Pull(name string, metaHeader http.Header, authConfig *types.AuthConfig, privileges types.PluginPrivileges) (err error)
Pull pulls a plugin, check if the correct privileges are provided and install the plugin.
func (*Manager) Remove ¶
func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error
Remove deletes plugin's root directory.
func (*Manager) Shutdown ¶
func (pm *Manager) Shutdown()
Shutdown stops all plugins and called during daemon shutdown.
func (*Manager) StateChanged ¶
func (pm *Manager) StateChanged(id string, e libcontainerd.StateInfo) error
StateChanged updates plugin internals using libcontainerd events.