package v2
import "github.com/docker/cli/components/engine/plugin/v2"
Index ¶
- type ErrInadequateCapability
- type Plugin
- func (p *Plugin) Acquire()
- func (p *Plugin) AddRefCount(count int)
- func (p *Plugin) BasePath() string
- func (p *Plugin) Client() *plugins.Client
- func (p *Plugin) FilterByCap(capability string) (*Plugin, error)
- func (p *Plugin) GetID() string
- func (p *Plugin) GetRefCount() int
- func (p *Plugin) GetSocket() string
- func (p *Plugin) GetTypes() []types.PluginInterfaceType
- func (p *Plugin) InitEmptySettings()
- func (p *Plugin) InitSpec(execRoot string) (*specs.Spec, error)
- func (p *Plugin) IsEnabled() bool
- func (p *Plugin) IsV1() bool
- func (p *Plugin) Name() string
- func (p *Plugin) Release()
- func (p *Plugin) Set(args []string) error
- func (p *Plugin) SetPClient(client *plugins.Client)
Types ¶
type ErrInadequateCapability ¶
type ErrInadequateCapability struct {
// contains filtered or unexported fields
}
ErrInadequateCapability indicates that the plugin did not have the requested capability.
func (ErrInadequateCapability) Error ¶
func (e ErrInadequateCapability) Error() string
type Plugin ¶
type Plugin struct { PluginObj types.Plugin `json:"plugin"` // todo: embed struct PropagatedMount string // TODO: make private Rootfs string // TODO: make private Config digest.Digest Blobsums []digest.Digest SwarmServiceID string // contains filtered or unexported fields }
Plugin represents an individual plugin.
func (*Plugin) Acquire ¶
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 ¶
AddRefCount adds to reference count.
func (*Plugin) BasePath ¶
BasePath returns the path to which all paths returned by the plugin are relative to. For Plugin objects this returns the host path of the plugin container's rootfs.
func (*Plugin) Client ¶
Client returns the plugin client.
func (*Plugin) FilterByCap ¶
FilterByCap query the plugin for a given capability.
func (*Plugin) GetID ¶
GetID returns the plugin's ID.
func (*Plugin) GetRefCount ¶
GetRefCount returns the reference count.
func (*Plugin) GetSocket ¶
GetSocket returns the plugin socket.
func (*Plugin) GetTypes ¶
func (p *Plugin) GetTypes() []types.PluginInterfaceType
GetTypes returns the interface types of a plugin.
func (*Plugin) InitEmptySettings ¶
func (p *Plugin) InitEmptySettings()
InitEmptySettings initializes empty settings for a plugin.
func (*Plugin) InitSpec ¶
InitSpec creates an OCI spec from the plugin's config.
func (*Plugin) IsEnabled ¶
IsEnabled returns the active state of the plugin.
func (*Plugin) IsV1 ¶
IsV1 returns true for V1 plugins and false otherwise.
func (*Plugin) Name ¶
Name returns the plugin name.
func (*Plugin) Release ¶
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) Set ¶
Set is used to pass arguments to the plugin.
func (*Plugin) SetPClient ¶
SetPClient set the plugin client.
Source Files ¶
plugin.go plugin_linux.go settable.go
- Version
- v17.12.0-ce-rc1+incompatible
- Published
- Dec 7, 2017
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 9 minutes ago –
Tools for package owners.