Documentation ¶
Overview ¶
Package dm provides a binding for Docker Machine
Index ¶
- Constants
- Variables
- type AuthOptions
- type DockerMachine
- func (dm *DockerMachine) Client(name string) (*client.Client, error)
- func (dm *DockerMachine) Env(name string) (map[string]string, error)
- func (dm *DockerMachine) Inspect(name string) (MachineConfig, error)
- func (dm *DockerMachine) Machine(name string) (Machine, error)
- func (dm *DockerMachine) Machines() ([]Machine, error)
- func (dm *DockerMachine) RawCommandResult(arg ...string) ([]byte, error)
- type EngineOptions
- type HostOptions
- type Machine
- type MachineConfig
- type MachineState
Constants ¶
const (
// DefaultDockerMachinePath is the default path to `docker-machine`
DefaultDockerMachinePath = "docker-machine"
)
Variables ¶
var ( // ExepctedMachineConfigVersions are expected, but not mandatory ExepctedMachineConfigVersions = []int{3} )
Functions ¶
This section is empty.
Types ¶
type AuthOptions ¶
type AuthOptions struct { CaCertPath string `json:"CaCertPath"` ClientCertPath string `json:"ClientCertPath"` ClientKeyPath string `json:"ClientKeyPath"` StorePath string `json:"StorePath"` }
AuthOptions is included in a result of `docker-machine inspect`
type DockerMachine ¶
type DockerMachine struct { Path string // contains filtered or unexported fields }
DockerMachine is an instance of `docker-machine`
func NewDockerMachine ¶
func NewDockerMachine() *DockerMachine
NewDockerMachine instantiates DockerMachine
func (*DockerMachine) Client ¶
func (dm *DockerMachine) Client(name string) (*client.Client, error)
Client returns docker/engine-api/client.(*Client) for the machine. The API version is set to client.DefaultVersion. You can update the version later by calling (*Client).UpdateClientVersion.
func (*DockerMachine) Env ¶
func (dm *DockerMachine) Env(name string) (map[string]string, error)
Env returns string map that contains DOCKER_{TLS_VERIFY,HOST,CERT_PATH,MACHINE_NAME}
func (*DockerMachine) Inspect ¶
func (dm *DockerMachine) Inspect(name string) (MachineConfig, error)
Inspect inspects the machine (`docker-machine inspect`)
func (*DockerMachine) Machine ¶
func (dm *DockerMachine) Machine(name string) (Machine, error)
Machine returns the machine (`docker-machine ls`)
func (*DockerMachine) Machines ¶
func (dm *DockerMachine) Machines() ([]Machine, error)
Machines returns the list of machines (`docker-machine ls`)
func (*DockerMachine) RawCommandResult ¶
func (dm *DockerMachine) RawCommandResult(arg ...string) ([]byte, error)
RawCommandResult returns a raw `docker-machine` command result with arg
type EngineOptions ¶
type EngineOptions struct {
TLSVerify bool `json:"TlsVerify"`
}
EngineOptions is included in a result of `docker-machine inspect`
type HostOptions ¶
type HostOptions struct { EngineOptions EngineOptions `json:"EngineOptions"` AuthOptions AuthOptions `json:"AuthOptions"` }
HostOptions is included in a result of `docker-machine inspect`
type Machine ¶
type Machine struct { Name string `json:"Name"` State MachineState `json:"State"` URL string `json:"URL"` }
Machine is a result of `docker-machine ls`
type MachineConfig ¶
type MachineConfig struct { ConfigVersion int `json:"ConfigVersion"` HostOptions HostOptions `json:"HostOptions"` }
MachineConfig is a result of `docker-machine inspect`