This section is empty.


This section is empty.


func NewDriver

func NewDriver(machineName, storePath string) drivers.Driver

NewDriver creates a Driver with the specified machineName and storePath.


type Driver

type Driver struct {
	URL              string
	APIKey           string `json:"ApiKey"`
	APISecretKey     string `json:"ApiSecretKey"`
	InstanceProfile  string
	DiskSize         int64
	Image            string
	SecurityGroups   []string
	AffinityGroups   []string
	AvailabilityZone string
	SSHKey           string
	KeyPair          string
	Password         string
	PublicKey        string
	UserDataFile     string
	UserData         []byte
	ID               string `json:"Id"`

Driver is the struct compatible with interface

func (*Driver) Create

func (d *Driver) Create() error

Create creates the VM instance acting as the docker host

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver

func (*Driver) GetCreateFlags

func (d *Driver) GetCreateFlags() []mcnflag.Flag

GetCreateFlags registers the flags this driver adds to "docker hosts create"

func (*Driver) GetSSHHostname

func (d *Driver) GetSSHHostname() (string, error)

GetSSHHostname returns the hostname to use with SSH

func (*Driver) GetSSHUsername

func (d *Driver) GetSSHUsername() string

GetSSHUsername returns the username to use with SSH

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

GetState returns a representing the state of the host (running, stopped, etc.)

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

GetURL returns a Docker compatible host URL for connecting to this host e.g tcp://

func (*Driver) Kill

func (d *Driver) Kill() error

Kill stops a host forcefully (same as Stop)

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreateCheck allows for pre-create operations to make sure a driver is ready for creation

func (*Driver) Remove

func (d *Driver) Remove() error

Remove destroys the VM instance and the associated SSH key.

func (*Driver) Restart

func (d *Driver) Restart() error

Restart reboots the existing VM instance.

func (*Driver) SetConfigFromFlags

func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error

SetConfigFromFlags configures the driver with the object that was returned by RegisterCreateFlags

func (*Driver) Start

func (d *Driver) Start() error

Start starts the existing VM instance.

func (*Driver) Stop

func (d *Driver) Stop() error

Stop stops the existing VM instance.

Source Files