node

package
v3.7.1-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Running     = "running"
	Offline     = "offline"
	Unknown     = "unknown"
	Error       = "error"
	Init        = "init"
	InitSuccess = "init_success"
	InitFailed  = "init_failed"
	Installing  = "installing"
)

Variables

This section is empty.

Functions

func RegToHost

func RegToHost(node *client.HostNode, opt string)

RegToHost regist node id to hosts file

Types

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}

Cluster node controller

func CreateCluster

func CreateCluster(kubecli kubecache.KubeClient, node *client.HostNode, datacenterConfig *config.DataCenterConfig) *Cluster

CreateCluster create node controller

func (*Cluster) CacheNode

func (n *Cluster) CacheNode(node *client.HostNode)

CacheNode 添加节点到缓存

func (*Cluster) CheckNodeInstall

func (n *Cluster) CheckNodeInstall(node *client.HostNode)

CheckNodeInstall 简称节点是否安装 rainbond node 如果未安装,尝试安装

func (*Cluster) GetAllNode

func (n *Cluster) GetAllNode() (nodes []*client.HostNode)

GetAllNode 获取全部节点

func (*Cluster) GetLabelsNode

func (n *Cluster) GetLabelsNode(labels map[string]string) []string

GetLabelsNode 返回匹配labels的节点ID

func (*Cluster) GetNode

func (n *Cluster) GetNode(id string) *client.HostNode

GetNode get rainbond node info

func (*Cluster) InstallNode

func (n *Cluster) InstallNode()

InstallNode 安装节点

func (*Cluster) RemoveNode

func (n *Cluster) RemoveNode(nodeID string)

RemoveNode 从缓存移除节点

func (*Cluster) Start

func (n *Cluster) Start(errchan chan error) error

Start 启动

func (*Cluster) Stop

func (n *Cluster) Stop(i interface{})

Stop 停止

func (*Cluster) UnlockUpdateNode

func (n *Cluster) UnlockUpdateNode(node *client.HostNode)

UpdateNode 更新节点信息

func (*Cluster) UpdateNode

func (n *Cluster) UpdateNode(node *client.HostNode)

UpdateNode 更新节点信息

func (*Cluster) UpdateNodeCondition

func (n *Cluster) UpdateNodeCondition(nodeID, ctype, cvalue string)

UpdateNodeCondition 更新节点状态

Jump to

Keyboard shortcuts

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