cockroach: Index | Files

package cloud

import ""


Package Files

cluster_cloud.go gc.go

func CreateCluster Uses

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

CreateCluster TODO(peter): document

func DestroyCluster Uses

func DestroyCluster(c *Cluster) error

DestroyCluster TODO(peter): document

func ExtendCluster Uses

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

ExtendCluster TODO(peter): document

func GCClusters Uses

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.

type Cloud Uses

type Cloud struct {
    Clusters map[string]*Cluster `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"`

Cloud TODO(peter): document

func ListCloud Uses

func ListCloud() (*Cloud, error)

ListCloud TODO(peter): document

func (*Cloud) BadInstanceErrors Uses

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

BadInstanceErrors TODO(peter): document

func (*Cloud) Clone Uses

func (c *Cloud) Clone() *Cloud

Clone creates a deep copy of the receiver.

type Cluster Uses

type Cluster 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 Cluster is created by querying various vm.Provider instances.

TODO(benesch): unify with syncedCluster.

func (*Cluster) Clouds Uses

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

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

func (*Cluster) ExpiresAt Uses

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

ExpiresAt TODO(peter): document

func (*Cluster) GCAt Uses

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

GCAt TODO(peter): document

func (*Cluster) IsLocal Uses

func (c *Cluster) IsLocal() bool

IsLocal TODO(peter): document

func (*Cluster) LifetimeRemaining Uses

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

LifetimeRemaining TODO(peter): document

func (*Cluster) PrintDetails Uses

func (c *Cluster) PrintDetails()

PrintDetails TODO(peter): document

func (*Cluster) String Uses

func (c *Cluster) String() string

Package cloud imports 17 packages (graph) and is imported by 1 packages. Updated 2020-05-16. Refresh now. Tools for package owners.