cloud

package
v0.0.0-...-1f20b29 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCluster

func CreateCluster(name string, nodes int, opts vm.CreateOpts) error

func DestroyCluster

func DestroyCluster(c *CloudCluster) error

func ExtendCluster

func ExtendCluster(c *CloudCluster, extension time.Duration) error

func GCClusters

func GCClusters(cloud *Cloud, dryrun bool) error

GCClusters checks all cluster to see if they should be deleted. It only fails on failure to perform cloud actions. All others actions (load/save file, email) do not abort.

Types

type Cloud

type Cloud struct {
	Clusters map[string]*CloudCluster `json:"clusters"`
	// Any VM in this list can be expected to have at least one element
	// in its Errors field.
	BadInstances vm.List `json:"bad_instances"`
}

func ListCloud

func ListCloud() (*Cloud, error)

func (*Cloud) BadInstanceErrors

func (c *Cloud) BadInstanceErrors() map[error]vm.List

Collate Cloud.BadInstances by errors.

func (*Cloud) Clone

func (c *Cloud) Clone() *Cloud

Clone creates a deep copy of the receiver.

type CloudCluster

type CloudCluster struct {
	Name string `json:"name"`
	User string `json:"user"`
	// This is the earliest creation and shortest lifetime across VMs.
	CreatedAt time.Time     `json:"created_at"`
	Lifetime  time.Duration `json:"lifetime"`
	VMs       vm.List       `json:"vms"`
}

A CloudCluster is created by querying various vm.Provider instances.

TODO(benesch): unify with syncedCluster.

func (*CloudCluster) Clouds

func (c *CloudCluster) Clouds() []string

Clouds returns the names of all of the various cloud providers used by the VMs in the cluster.

func (*CloudCluster) ExpiresAt

func (c *CloudCluster) ExpiresAt() time.Time

func (*CloudCluster) GCAt

func (c *CloudCluster) GCAt() time.Time

func (*CloudCluster) IsLocal

func (c *CloudCluster) IsLocal() bool

func (*CloudCluster) LifetimeRemaining

func (c *CloudCluster) LifetimeRemaining() time.Duration

func (*CloudCluster) PrintDetails

func (c *CloudCluster) PrintDetails()

func (*CloudCluster) String

func (c *CloudCluster) String() string

Jump to

Keyboard shortcuts

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