docker: github.com/docker/docker/daemon/cluster/controllers/plugin Index | Files

package plugin

import "github.com/docker/docker/daemon/cluster/controllers/plugin"

Index

Package Files

controller.go

type Backend Uses

type Backend interface {
    Disable(name string, config *enginetypes.PluginDisableConfig) error
    Enable(name string, config *enginetypes.PluginEnableConfig) error
    Remove(name string, config *enginetypes.PluginRmConfig) error
    Pull(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer, opts ...plugin.CreateOpt) error
    Upgrade(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer) error
    Get(name string) (*v2.Plugin, error)
    SubscribeEvents(buffer int, events ...plugin.Event) (eventCh <-chan interface{}, cancel func())
}

Backend is the interface for interacting with the plugin manager Controller actions are passed to the configured backend to do the real work.

type Controller Uses

type Controller struct {
    // contains filtered or unexported fields
}

Controller is the controller for the plugin backend. Plugins are managed as a singleton object with a desired state (different from containers). With the plugin controller instead of having a strict create->start->stop->remove task lifecycle like containers, we manage the desired state of the plugin and let the plugin manager do what it already does and monitor the plugin. We'll also end up with many tasks all pointing to the same plugin ID.

TODO(@cpuguy83): registry auth is intentionally not supported until we work out the right way to pass registry credentials via secrets.

func NewController Uses

func NewController(backend Backend, t *api.Task) (*Controller, error)

NewController returns a new cluster plugin controller

func (*Controller) Close Uses

func (p *Controller) Close() error

Close is the close phase from swarmkit

func (*Controller) Prepare Uses

func (p *Controller) Prepare(ctx context.Context) (err error)

Prepare is the prepare phase from swarmkit

func (*Controller) Remove Uses

func (p *Controller) Remove(ctx context.Context) error

Remove is the remove phase from swarmkit

func (*Controller) Shutdown Uses

func (p *Controller) Shutdown(ctx context.Context) error

Shutdown is the shutdown phase from swarmkit

func (*Controller) Start Uses

func (p *Controller) Start(ctx context.Context) error

Start is the start phase from swarmkit

func (*Controller) Terminate Uses

func (p *Controller) Terminate(ctx context.Context) error

Terminate is the terminate phase from swarmkit

func (*Controller) Update Uses

func (p *Controller) Update(ctx context.Context, t *api.Task) error

Update is the update phase from swarmkit

func (*Controller) Wait Uses

func (p *Controller) Wait(ctx context.Context) error

Wait causes the task to wait until returned

Package plugin imports 14 packages (graph) and is imported by 84 packages. Updated 2019-09-18. Refresh now. Tools for package owners.