plugin

package
v17.12.0-ce-rc1...-aa6a989 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, c CreateClient, name string, opts ...CreateOpt) error

Create creates a new plugin with the specified name

func CreateInRegistry

func CreateInRegistry(ctx context.Context, repo string, auth *types.AuthConfig, opts ...CreateOpt) error

CreateInRegistry makes a plugin (locally) and pushes it to a registry. This does not use a dockerd instance to create or push the plugin. If you just want to create a plugin in some daemon, use `Create`.

This can be useful when testing plugins on swarm where you don't really want the plugin to exist on any of the daemons (immediately) and there needs to be some way to distribute the plugin.

Types

type Config

type Config struct {
	*types.PluginConfig
	// contains filtered or unexported fields
}

Config wraps types.PluginConfig to provide some extra state for options extra customizations on the plugin details, such as using a custom binary to create the plugin with.

type CreateClient

type CreateClient interface {
	PluginCreate(context.Context, io.Reader, types.PluginCreateOptions) error
}

CreateClient is the interface used for `BuildPlugin` to interact with the daemon.

type CreateOpt

type CreateOpt func(*Config)

CreateOpt is passed used to change the default plugin config before creating it

func WithBinary

func WithBinary(bin string) CreateOpt

WithBinary is a CreateOpt to set an custom binary to create the plugin with. This binary must be statically compiled.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL