provider

package
v0.18.3-0...-c90ca1e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIP

func AddIP(ip string) error

AddIP ..

func AddMount

func AddMount(local, host string) error

AddMount ...

func BridgeRequired

func BridgeRequired() bool

func Create

func Create() error

Create ...

func Destroy

func Destroy() error

Destroy ..

func Display

func Display(verb bool)

Display ...

func DockerEnv

func DockerEnv() error

DockerEnv ..

func HasMount

func HasMount(path string) bool

HasMount ...

func HostIP

func HostIP() (string, error)

HostIP ..

func HostMntDir

func HostMntDir() string

HostMntDir ..

func HostShareDir

func HostShareDir() string

HostShareDir ...

func Implode

func Implode() error

Implode ..

func IsReady

func IsReady() bool

func Name

func Name() string

func Reboot

func Reboot() error

Reboot ...

func Register

func Register(name string, p Provider)

Register ...

func RemoveEnvDir

func RemoveEnvDir(id string) error

RemoveEnvDir ...

func RemoveIP

func RemoveIP(ip string) error

RemoveIP ...

func RemoveMount

func RemoveMount(local, host string) error

RemoveMount ...

func RequiresMount

func RequiresMount() bool

RequiresMount ...

func ReservedIPs

func ReservedIPs() []string

ReservedIPs ..

func Run

func Run(command []string) ([]byte, error)

Run a command inside of the provider context

func SetDefaultIP

func SetDefaultIP(ip string) error

SetDefaultIP ...

func Start

func Start() error

Start ..

func Status

func Status() string

Status ...

func Stop

func Stop() error

Stop ...

func Valid

func Valid() (error, []string)

Valid ...

func ValidReady

func ValidReady() error

Types

type DockerMachine

type DockerMachine struct{}

DockerMachine ...

func (DockerMachine) AddIP

func (machine DockerMachine) AddIP(ip string) error

AddIP adds an IP into the docker-machine vm for host access

func (DockerMachine) AddMount

func (machine DockerMachine) AddMount(local, host string) error

AddMount adds a virtualbox mount into the docker-machine vm

func (DockerMachine) AddNat

func (machine DockerMachine) AddNat(ip, containerIP string) error

AddNat adds a nat to make an container accessible to the host network stack

func (DockerMachine) BridgeRequired

func (machine DockerMachine) BridgeRequired() bool

func (DockerMachine) Create

func (machine DockerMachine) Create() error

Create creates the docker-machine vm

func (DockerMachine) Destroy

func (machine DockerMachine) Destroy() error

Destroy destroys the docker-machine vm

func (DockerMachine) DockerEnv

func (machine DockerMachine) DockerEnv() error

DockerEnv exports the docker connection information to the running process

func (DockerMachine) HasMount

func (machine DockerMachine) HasMount(mount string) bool

HasMount checks to see if the mount exists in the vm

func (DockerMachine) HostIP

func (machine DockerMachine) HostIP() (string, error)

HostIP inspects docker-machine to return the IP address of the vm

func (DockerMachine) HostMntDir

func (machine DockerMachine) HostMntDir() string

HostMntDir ...

func (DockerMachine) HostShareDir

func (machine DockerMachine) HostShareDir() string

HostShareDir ...

func (DockerMachine) Implode

func (machine DockerMachine) Implode() error

imploding the docker-machine provider is the same as destroying it

func (DockerMachine) IsReady

func (machine DockerMachine) IsReady() bool

IsReady ...

func (DockerMachine) Reboot

func (machine DockerMachine) Reboot() error

Reboot reboots the docker-machine vm

func (DockerMachine) RemoveEnvDir

func (machine DockerMachine) RemoveEnvDir(id string) error

func (DockerMachine) RemoveIP

func (machine DockerMachine) RemoveIP(ip string) error

RemoveIP removes an IP from the docker-machine vm

func (DockerMachine) RemoveMount

func (machine DockerMachine) RemoveMount(local, host string) error

RemoveMount removes a mount from the docker-machine vm

func (DockerMachine) RemoveNat

func (machine DockerMachine) RemoveNat(ip, containerIP string) error

RemoveNat removes nat from making a container inaccessible to the host network stack

func (DockerMachine) RequiresMount

func (machine DockerMachine) RequiresMount() bool

func (DockerMachine) ReservedIPs

func (machine DockerMachine) ReservedIPs() (rtn []string)

func (DockerMachine) Run

func (machine DockerMachine) Run(command []string) ([]byte, error)

Run a command in the vm

func (DockerMachine) SetDefaultIP

func (dockermachine DockerMachine) SetDefaultIP(ip string) error

func (DockerMachine) Start

func (machine DockerMachine) Start() error

Start starts and bootstraps docker-machine vm

func (DockerMachine) Status

func (machine DockerMachine) Status() string

func (DockerMachine) Stop

func (machine DockerMachine) Stop() error

Stop stops the docker-machine vm

func (DockerMachine) Valid

func (machine DockerMachine) Valid() (error, []string)

Valid ensures docker-machine is installed and available

type Native

type Native struct{}

Native ...

func (Native) AddIP

func (native Native) AddIP(ip string) error

AddIP adds an IP into the host for host access

func (Native) AddMount

func (native Native) AddMount(local, host string) error

AddMount adds a mount into the docker-machine vm

func (Native) AddNat

func (native Native) AddNat(ip, containerIP string) error

AddNat adds a nat to make an container accessible to the host network stack

func (Native) BridgeRequired

func (native Native) BridgeRequired() bool

func (Native) Create

func (native Native) Create() error

Create does nothing for native

func (Native) Destroy

func (native Native) Destroy() error

Destroy does nothing on native

func (Native) DockerEnv

func (native Native) DockerEnv() error

DockerEnv docker env should already be configured if docker is installed

func (Native) HasMount

func (native Native) HasMount(path string) bool

HasMount will return true if the mount already exists

func (Native) HostIP

func (native Native) HostIP() (string, error)

HostIP returns the loopback ip

func (Native) HostMntDir

func (native Native) HostMntDir() string

HostMntDir ...

func (Native) HostShareDir

func (native Native) HostShareDir() string

HostShareDir ...

func (Native) Implode

func (native Native) Implode() error

implode loops through the docker containers we created and removes each one

func (Native) IsReady

func (native Native) IsReady() bool

func (Native) Reboot

func (native Native) Reboot() error

Reboot does nothing for native

func (Native) RemoveEnvDir

func (native Native) RemoveEnvDir(id string) error

func (Native) RemoveIP

func (native Native) RemoveIP(ip string) error

RemoveIP removes an IP from the docker-machine vm

func (Native) RemoveMount

func (native Native) RemoveMount(_, host string) error

RemoveMount ...

func (Native) RemoveNat

func (native Native) RemoveNat(ip, containerIP string) error

RemoveNat removes nat from making a container inaccessible to the host network stack

func (Native) RequiresMount

func (native Native) RequiresMount() bool

func (Native) ReservedIPs

func (native Native) ReservedIPs() (rtn []string)

func (Native) Run

func (native Native) Run(command []string) ([]byte, error)

Run will run a command on the local machine (pass-through)

func (Native) SetDefaultIP

func (native Native) SetDefaultIP(ip string) error

func (Native) Start

func (native Native) Start() error

Start does nothing on native

func (Native) Status

func (native Native) Status() string

func (Native) Stop

func (native Native) Stop() error

Stop does nothing on native

func (Native) Valid

func (native Native) Valid() (error, []string)

Valid ensures docker-machine is installed and available

type Provider

type Provider interface {
	BridgeRequired() bool
	Status() string
	IsReady() bool
	HostShareDir() string
	HostMntDir() string
	HostIP() (string, error)
	ReservedIPs() []string
	Valid() (error, []string)
	Create() error
	Reboot() error
	Stop() error
	Implode() error
	Destroy() error
	Start() error
	DockerEnv() error
	// we might be able to remove ip stuff as well
	AddIP(ip string) error
	RemoveIP(ip string) error
	SetDefaultIP(ip string) error
	// AddNat(host, container string) error
	// RemoveNat(host, container string) error
	RequiresMount() bool
	HasMount(mount string) bool
	AddMount(local, host string) error
	RemoveMount(local, host string) error
	RemoveEnvDir(id string) error
	Run(command []string) ([]byte, error)
}

Provider ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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