Documentation
¶
Index ¶
- Constants
- type Cluster
- type ClusterList
- type ClusterReq
- type Model
- type Node
- type NodeList
- type NodeReq
- type Status
- type VM
- func (v *VM) Bootstrap(sshInfo *ssh.SSHInfo) (bool, error)
- func (v *VM) ConnectionTest(sshInfo *ssh.SSHInfo, vm *VM) error
- func (v *VM) ControlPlaneInit(sshInfo *ssh.SSHInfo, ip string) (string, string, error)
- func (v *VM) CopyScripts(sshInfo *ssh.SSHInfo, vm *VM) error
- func (v *VM) WorkerJoin(sshInfo *ssh.SSHInfo, workerJoinCmd *string) (bool, error)
- func (v *VM) WorkerJoinForAddNode(sshInfo *ssh.SSHInfo, workerJoinCmd *string) (bool, error)
Constants ¶
View Source
const ( KIND_STATUS = "Status" KIND_CLUSTER = "Cluster" KIND_CLUSTER_LIST = "ClusterList" KIND_NODE = "Node" KIND_NODE_LIST = "NodeList" )
View Source
const ( STATUS_CREATED = "created" STATUS_PROVISIONING = "provisioning" STATUS_COMPLETED = "completed" STATUS_FAILED = "failed" )
View Source
const ( STATUS_UNKNOWN = 0 STATUS_SUCCESS = 1 STATUS_NOT_EXIST = 404 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
Model
Status string `json:"status"`
UId string `json:"uid"`
MCIS string `json:"mcis"`
Namespace string `json:"namespace"`
ClusterConfig string `json:"clusterConfig"`
Nodes []Node `json:"nodes"`
}
func NewCluster ¶
type ClusterList ¶
func NewClusterList ¶
func NewClusterList() *ClusterList
func (*ClusterList) SelectList ¶
func (c *ClusterList) SelectList(namespace string, clusters *ClusterList) (*ClusterList, error)
type ClusterReq ¶
type Node ¶
type Node struct {
Model
Credential string `json:"credential"`
PublicIP string `json:"publicIp"`
UId string `json:"uid"`
Role string `json:"role"`
Spec string `json:"spec"`
}
func NewNodeDef ¶
type NodeList ¶
func NewNodeList ¶
func NewNodeList() *NodeList
type Status ¶
type VM ¶
type VM struct {
Name string `json:"name"`
Config string `json:"connectionName"`
VPC string `json:"vNetId"`
Subnet string `json:"subnetId"`
Firewall []string `json:"securityGroupIds"`
SSHKey string `json:"sshKeyId"`
Image string `json:"imageId"`
Spec string `json:"specId"`
UserAccount string `json:"vmUserAccount"`
UserPassword string `json:"vmUserPassword"`
Description string `json:"description"`
PublicIP string `json:"publicIP"` // output
Credential string // private
UId string `json:"uid"`
Role string `json:"role"`
}
func (*VM) ControlPlaneInit ¶
func (*VM) WorkerJoin ¶
Click to show internal directories.
Click to hide internal directories.