docker

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentArgs

type DeploymentArgs struct {
	RemoteClient *remote.Client
	PluginName   string
	ConfigPath   string
	Log          *logrus.Entry
}

DeploymentArgs - arguments for plugin deployment

type PluginDeployment

type PluginDeployment struct {
	// RemoteClient - ssh client to connect through
	RemoteClient *remote.Client

	// PluginName - Docker plugin name to deploy
	PluginName string

	// ConfigPath - path to yaml config file for docker plugin
	ConfigPath string
	// contains filtered or unexported fields
}

PluginDeployment - Docker plugin deployment

func NewPluginDeployment

func NewPluginDeployment(args DeploymentArgs) (*PluginDeployment, error)

NewPluginDeployment - create new Docker plugin deployment

func (*PluginDeployment) CleanUp

func (d *PluginDeployment) CleanUp()

CleanUp - silently removes plugin and restores original config file

func (*PluginDeployment) CreateVolume

func (d *PluginDeployment) CreateVolume(volume string) error

CreateVolume creates Docker volume

func (*PluginDeployment) Install

func (d *PluginDeployment) Install() error

Install - runs `docker plugin install ...` and `docker plugin enable ...`

func (*PluginDeployment) RemoveVolume

func (d *PluginDeployment) RemoveVolume(volume string) error

RemoveVolume removes volume

func (*PluginDeployment) RunVolumeContainerCommand

func (d *PluginDeployment) RunVolumeContainerCommand(volume, command string) (string, error)

RunVolumeContainerCommand runs Ubuntu Docker container with specified volume and executes command inside of it

func (*PluginDeployment) Uninstall

func (d *PluginDeployment) Uninstall() error

Uninstall - runs `docker plugin disable -f ...` and `docker plugin rm -f ...` TODO use upgrade?

Jump to

Keyboard shortcuts

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