Documentation ¶
Index ¶
- type API
- func (a *API) AddKey(name, key string) error
- func (a *API) CheckInstances(ids []*string, d time.Duration) error
- func (a *API) CreateInstances(keyname, userdata string, count uint64, wait bool) ([]*ec2.Instance, error)
- func (a *API) DeleteKey(name string) error
- func (a *API) TerminateInstance(id string) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new AWS API wrapper. It uses credentials from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
func (*API) CheckInstances ¶
CheckInstances waits until a set of EC2 instances are accessible by SSH, waiting a maximum of 'd' time.
func (*API) CreateInstances ¶
func (a *API) CreateInstances(keyname, userdata string, count uint64, wait bool) ([]*ec2.Instance, error)
CreateInstances creates EC2 instances with a given ssh key name, user data. The image ID, instance type, and security group set in the API will be used. If wait is true, CreateInstances will block until all instances are reachable by SSH.
func (*API) TerminateInstance ¶
TerminateInstance schedules an EC2 instance to be terminated.
Click to show internal directories.
Click to hide internal directories.