Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- type Driver
- func (d *Driver) Config() *config.Config
- func (d *Driver) Create() error
- func (d *Driver) DriverName() string
- func (d *Driver) GetClient() Client
- func (d *Driver) GetCreateFlags() []mcnflag.Flag
- func (d *Driver) GetSSHHostname() (string, error)
- func (d *Driver) GetState() (state.State, error)
- func (d *Driver) GetURL() (string, error)
- func (d *Driver) Kill() error
- func (d *Driver) PreCreateCheck() error
- func (d *Driver) Remove() error
- func (d *Driver) Restart() error
- func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
- func (d *Driver) Start() error
- func (d *Driver) Stop() error
- type RunInstanceArg
- type SSHKeyPair
Constants ¶
View Source
const ( INSTANCE_STATUS_PENDING = "pending" INSTANCE_STATUS_RUNNING = "running" INSTANCE_STATUS_STOPPED = "stopped" INSTANCE_STATUS_SUSPENDED = "suspended" INSTANCE_STATUS_TERMINATED = "terminated" INSTANCE_STATUS_CEASED = "ceased" )
View Source
const (
DefaultSecurityGroupName = "docker-machine"
)
Variables ¶
View Source
var DefaultInstanceClassByZone = map[string]int{"pek1": 0, "pek2": 0, "pek3a": 0, "gd1": 0, "ap1": 0, "sh1a": 1}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
RunInstance(arg *RunInstanceArg) (*qcservice.Instance, error)
DescribeInstance(instanceID *string) (*qcservice.Instance, error)
StartInstance(instanceID *string) error
StopInstance(instanceID *string, force bool) error
RestartInstance(instanceID *string) error
TerminateInstance(instanceID *string) error
WaitInstanceStatus(instanceID *string, status string) error
BindEIP(instanceID *string) (*qcservice.EIP, error)
ReleaseEIP(eipID *string) error
BindSecurityGroup(instanceID *string, rules []*qcservice.SecurityGroupRule) (*qcservice.SecurityGroup, error)
DeleteSecurityGroup(sgID *string) error
CreateKeyPair(keyPairName *string, publicKey *string) (*string, error)
DescribeKeyPair(keyPairID *string) (*qcservice.KeyPair, error)
DeleteKeyPair(keyPairID *string) error
}
type Driver ¶
type Driver struct {
*drivers.BaseDriver
AccessKeyID string
SecretAccessKey string
Zone string
Image string
CPU int
Memory int
LoginKeyPair string
VxNet string
InstanceID *string
EIP *qcservice.EIP
SecurityGroup *qcservice.SecurityGroup
// contains filtered or unexported fields
}
func (*Driver) DriverName ¶
DriverName returns the name of the driver
func (*Driver) GetCreateFlags ¶
func (*Driver) GetSSHHostname ¶
func (*Driver) GetURL ¶
GetURL returns a Docker compatible host URL for connecting to this host e.g. tcp://1.2.3.4:2376
func (*Driver) PreCreateCheck ¶
PreCreateCheck allows for pre-create operations to make sure a driver is ready for creation
func (*Driver) Restart ¶
Restart a host. This may just call Stop(); Start() if the provider does not have any special restart behaviour.
func (*Driver) SetConfigFromFlags ¶
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
SetConfigFromFlags configures the driver with the object that was returned by RegisterCreateFlags
type RunInstanceArg ¶
type SSHKeyPair ¶
type SSHKeyPair struct {
ID string
}
Click to show internal directories.
Click to hide internal directories.