docker: Index | Files

package v2

import ""


Package Files

plugin.go plugin_linux.go settable.go

type ErrInadequateCapability Uses

type ErrInadequateCapability struct {
    // contains filtered or unexported fields

ErrInadequateCapability indicates that the plugin did not have the requested capability.

func (ErrInadequateCapability) Error Uses

func (e ErrInadequateCapability) Error() string

type Plugin Uses

type Plugin struct {
    PluginObj types.Plugin `json:"plugin"` // todo: embed struct

    Rootfs string // TODO: make private

    Config   digest.Digest
    Blobsums []digest.Digest
    Manifest digest.Digest

    SwarmServiceID string
    // contains filtered or unexported fields

Plugin represents an individual plugin.

func (*Plugin) Acquire Uses

func (p *Plugin) Acquire()

Acquire increments the plugin's reference count This should be followed up by `Release()` when the plugin is no longer in use.

func (*Plugin) AddRefCount Uses

func (p *Plugin) AddRefCount(count int)

AddRefCount adds to reference count.

func (*Plugin) Addr Uses

func (p *Plugin) Addr() net.Addr

Addr returns the net.Addr to use to connect to the plugin socket

func (*Plugin) Client Uses

func (p *Plugin) Client() *plugins.Client

Client returns the plugin client. Deprecated: use p.Addr() and manually create the client

func (*Plugin) FilterByCap Uses

func (p *Plugin) FilterByCap(capability string) (*Plugin, error)

FilterByCap query the plugin for a given capability.

func (*Plugin) GetID Uses

func (p *Plugin) GetID() string

GetID returns the plugin's ID.

func (*Plugin) GetRefCount Uses

func (p *Plugin) GetRefCount() int

GetRefCount returns the reference count.

func (*Plugin) GetSocket Uses

func (p *Plugin) GetSocket() string

GetSocket returns the plugin socket.

func (*Plugin) GetTypes Uses

func (p *Plugin) GetTypes() []types.PluginInterfaceType

GetTypes returns the interface types of a plugin.

func (*Plugin) InitEmptySettings Uses

func (p *Plugin) InitEmptySettings()

InitEmptySettings initializes empty settings for a plugin.

func (*Plugin) InitSpec Uses

func (p *Plugin) InitSpec(execRoot string) (*specs.Spec, error)

InitSpec creates an OCI spec from the plugin's config.

func (*Plugin) IsEnabled Uses

func (p *Plugin) IsEnabled() bool

IsEnabled returns the active state of the plugin.

func (*Plugin) IsV1 Uses

func (p *Plugin) IsV1() bool

IsV1 returns true for V1 plugins and false otherwise.

func (*Plugin) Name Uses

func (p *Plugin) Name() string

Name returns the plugin name.

func (*Plugin) Protocol Uses

func (p *Plugin) Protocol() string

Protocol is the protocol that should be used for interacting with the plugin.

func (*Plugin) Release Uses

func (p *Plugin) Release()

Release decrements the plugin's reference count This should only be called when the plugin is no longer in use, e.g. with via `Acquire()` or getter.Get("name", "type", plugingetter.Acquire)

func (*Plugin) ScopedPath Uses

func (p *Plugin) ScopedPath(s string) string

ScopedPath returns the path scoped to the plugin rootfs

func (*Plugin) Set Uses

func (p *Plugin) Set(args []string) error

Set is used to pass arguments to the plugin.

func (*Plugin) SetAddr Uses

func (p *Plugin) SetAddr(addr net.Addr)

SetAddr sets the plugin address which can be used for dialing the plugin.

func (*Plugin) SetPClient Uses

func (p *Plugin) SetPClient(client *plugins.Client)

SetPClient set the plugin client. Deprecated: Hardcoded plugin client is deprecated

func (*Plugin) SetSpecOptModifier Uses

func (p *Plugin) SetSpecOptModifier(f func(*specs.Spec))

SetSpecOptModifier sets the function to use to modify the generated runtime spec.

func (*Plugin) SetTimeout Uses

func (p *Plugin) SetTimeout(t time.Duration)

SetTimeout sets the timeout to use for dialing.

func (*Plugin) Timeout Uses

func (p *Plugin) Timeout() time.Duration

Timeout gets the currently configured connection timeout. This should be used when dialing the plugin.

Package v2 imports 17 packages (graph) and is imported by 300 packages. Updated 2020-04-25. Refresh now. Tools for package owners.