boh

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: 30 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

Types

type Cluster

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

Cluster is the object describing a cluster

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(hostID string) error

DeleteSpecificNode deletes the node specified by its ID

func (*Cluster) FindAvailableMaster

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

FindAvailableMaster returns the ID of the first master available for execution

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 Does nothing currently...

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 of the cluster

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(hostID 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 master nodes in the cluster No masters in BOH...

func (*Cluster) ListMasterIPs

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

ListMasterIPs lists the master nodes in the cluster No masters in BOH...

func (*Cluster) ListNodeIDs

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

ListNodeIDs lists the IDs of the nodes in the cluster

func (*Cluster) ListNodeIPs

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

ListNodeIPs lists the IPs of the nodes in the cluster

func (*Cluster) Reload

func (c *Cluster) Reload() error

Reload reloads metadata of Cluster from ObjectStorage

func (*Cluster) SearchNode

func (c *Cluster) SearchNode(hostID 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 of the cluster

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