digitalocean

package
v0.0.0-...-f852ded Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Regions = []string{"nyc1", "nyc2", "lon1", "sfo1", "sfo2"}

Regions supported by the Digital Ocean API

Functions

This section is empty.

Types

type Provider

type Provider struct {
	client.Client
	// contains filtered or unexported fields
}

The Provider object represents a connection to DigitalOcean.

func New

func New(namespace, region string) (*Provider, error)

New starts a new client session with the API key provided in ~/.digitalocean/key.

func (Provider) Boot

func (prvdr Provider) Boot(machines []db.Machine) ([]string, error)

Boot will boot every machine in a goroutine, and wait for the machines to come up.

func (Provider) Cleanup

func (prvdr Provider) Cleanup() error

Cleanup removes unnecessary detritus from this provider. It's intended to be called when there are no VMS running or expected to be running soon.

func (Provider) List

func (prvdr Provider) List() (machines []db.Machine, err error)

List will fetch all droplets that have the same name as the cluster namespace.

func (Provider) SetACLs

func (prvdr Provider) SetACLs(acls []acl.ACL) error

SetACLs adds and removes acls in `prvdr` so that it conforms to `acls`.

func (Provider) Stop

func (prvdr Provider) Stop(machines []db.Machine) error

Stop stops each machine and deletes their attached volumes.

func (Provider) UpdateFloatingIPs

func (prvdr Provider) UpdateFloatingIPs(desired []db.Machine) error

UpdateFloatingIPs updates Droplet to Floating IP associations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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