dcos

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(req clusterapi.Request) (clusterapi.Cluster, error)

Create creates the necessary infrastructure of cluster

func Load

func Load(data *metadata.Cluster) (clusterapi.Cluster, error)

Load loads the internals of an existing cluster from metadata

func Sanitize

func Sanitize(data *metadata.Cluster) error

Sanitize tries to rebuild manager struct based on what is available on ObjectStorage

Types

type Cluster

type Cluster struct {
	// Core cluster data; serialized in ObjectStorage
	Core *clusterapi.ClusterCore
	// contains filtered or unexported fields
}

Cluster is the object describing a cluster based on DCOS

func (*Cluster) AddNode

func (c *Cluster) AddNode(public bool, req *pb.HostDefinition) (string, error)

AddNode adds one node

func (*Cluster) AddNodes

func (c *Cluster) AddNodes(count int, public bool, req *pb.HostDefinition) ([]string, error)

AddNodes adds <count> nodes

func (*Cluster) CountNodes

func (c *Cluster) CountNodes(public bool) uint

CountNodes returns the number of public or private nodes in the cluster

func (*Cluster) Delete

func (c *Cluster) Delete() error

Delete destroys everything related to the infrastructure built for the cluster

func (*Cluster) DeleteLastNode

func (c *Cluster) DeleteLastNode(public bool) error

DeleteLastNode deletes the last Agent node added

func (*Cluster) DeleteSpecificNode

func (c *Cluster) DeleteSpecificNode(ID string) error

DeleteSpecificNode deletes the node specified by its ID

func (*Cluster) FindAvailableMaster

func (c *Cluster) FindAvailableMaster() (string, error)

FindAvailableMaster returns the ID of a master available

func (*Cluster) FindAvailableNode

func (c *Cluster) FindAvailableNode(public bool) (string, error)

FindAvailableNode returns the ID of a node available

func (*Cluster) ForceGetState

func (c *Cluster) ForceGetState() (ClusterState.Enum, error)

ForceGetState returns the current state of the cluster This method will trigger a effective state collection at each call

func (*Cluster) GetConfig

func (c *Cluster) GetConfig() clusterapi.ClusterCore

GetConfig returns the public properties of the cluster

func (*Cluster) GetExtension

func (c *Cluster) GetExtension(ctx Extension.Enum) interface{}

GetExtension returns additional info corresponding to 'ctx'

func (*Cluster) GetName

func (c *Cluster) GetName() string

GetName returns the name of the cluster

func (*Cluster) GetNetworkID

func (c *Cluster) GetNetworkID() string

GetNetworkID returns the ID of the network used by the cluster

func (*Cluster) GetNode

func (c *Cluster) GetNode(ID string) (*pb.Host, error)

GetNode returns a node based on its ID

func (*Cluster) GetState

func (c *Cluster) GetState() (ClusterState.Enum, error)

GetState returns the current state of the cluster

func (*Cluster) ListMasterIDs

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

ListMasterIDs lists the IDs of the masters in the cluster

func (*Cluster) ListMasterIPs

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

ListMasterIPs lists the IPs of the masters in the cluster

func (*Cluster) ListNodeIDs

func (c *Cluster) ListNodeIDs(public bool) []string

ListNodeIDs lists the IDs of the nodes in the cluster; if public is set, list IDs of public nodes otherwise list IDs of private nodes

func (*Cluster) ListNodeIPs

func (c *Cluster) ListNodeIPs(public bool) []string

ListNodeIPs lists the IPs of the nodes in the cluster; if public is set, list IDs of public nodes otherwise list IDs of private nodes

func (*Cluster) Reload

func (c *Cluster) Reload() error

Reload reloads metadata of Cluster from ObjectStorage

func (*Cluster) SearchNode

func (c *Cluster) SearchNode(ID string, public bool) bool

SearchNode tells if an host ID corresponds to a node of the cluster

func (*Cluster) SetExtension

func (c *Cluster) SetExtension(ctx Extension.Enum, info interface{})

SetExtension returns additional info corresponding to 'ctx'

func (*Cluster) Start

func (c *Cluster) Start() error

Start starts the cluster named 'name' In BOH, cluster state is logical, there is no way to stop a BOH cluster (except by stopping the hosts)

func (*Cluster) Stop

func (c *Cluster) Stop() error

Stop stops the cluster is its current state is compatible

Directories

Path Synopsis
enums

Jump to

Keyboard shortcuts

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