Documentation ¶
Index ¶
- Constants
- type Mcks
- func (self *Mcks) AddNodes(clusterName string, req *McksNodeReq) (*McksNodeList, error)
- func (self *Mcks) CreateCluster(req McksClusterReq) (*McksCluster, error)
- func (self *Mcks) DeleteCluster(name string) (*McksStatus, error)
- func (self *Mcks) GetCluster(name string) (*McksCluster, error)
- func (self *Mcks) GetNode(clusterName, nodeName string) (*McksNode, error)
- func (self *Mcks) ListCluster() (*McksClusterList, error)
- func (self *Mcks) RemoveNode(clusterName, nodeName string) (*McksStatus, error)
- type McksCluster
- type McksClusterList
- type McksClusterReq
- type McksConfig
- type McksKubernetes
- type McksNode
- type McksNodeConfig
- type McksNodeList
- type McksNodeReq
- type McksStatus
- type Model
Constants ¶
View Source
const ( MCKS_STATUS_UNKNOWN = 0 MCKS_STATUS_SUCCESS = 1 MCKS_STATUS_NOT_EXIST = 404 )
View Source
const ( MCKS_CLUSTER_STATUS_PHASE_PENDING = "Pending" MCKS_CLUSTER_STATUS_PHASE_PROVISIONING = "Provisioning" MCKS_CLUSTER_STATUS_PHASE_PROVISIONED = "Provisioned" MCKS_CLUSTER_STATUS_PHASE_FAILED = "Failed" MCKS_CLUSTER_STATUS_PHASE_DELETING = "Deleting" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mcks ¶
type Mcks struct {
Model
}
func (*Mcks) AddNodes ¶
func (self *Mcks) AddNodes(clusterName string, req *McksNodeReq) (*McksNodeList, error)
func NewNodes(namespace, clusterName string) *Nodes { return &Nodes{ Model: Model{namespace: namespace}, clusterName: clusterName, } }
func (*Mcks) CreateCluster ¶
func (self *Mcks) CreateCluster(req McksClusterReq) (*McksCluster, error)
func (*Mcks) DeleteCluster ¶
func (self *Mcks) DeleteCluster(name string) (*McksStatus, error)
func (*Mcks) GetCluster ¶
func (self *Mcks) GetCluster(name string) (*McksCluster, error)
func (*Mcks) ListCluster ¶
func (self *Mcks) ListCluster() (*McksClusterList, error)
func (*Mcks) RemoveNode ¶
func (self *Mcks) RemoveNode(clusterName, nodeName string) (*McksStatus, error)
type McksCluster ¶
type McksCluster struct { ClusterConfig string `json:"clusterConfig"` CpLeader string `json:"cpLeader"` CreatedTime string `json:"createdTime"` Description string `json:"description"` InstallMonAgent string `json:"installMonAgent"` Kind string `json:"kind"` Label string `json:"label"` Mcis string `json:"mcis"` Name string `json:"name"` Namespace string `json:"namespace"` NetworkCni string `json:"networkCni"` Nodes []McksNode `json:"nodes"` Status struct { Phase string `json:"phase"` Reason string `json:"reason"` Message string `json:"message"` } `json:"status"` }
type McksClusterList ¶
type McksClusterList struct { Kind string `json:"kind"` Items []McksCluster `json:"items"` }
type McksClusterReq ¶
type McksClusterReq struct { Config McksConfig `json:"config"` ControlPlane []McksNodeConfig `json:"controlPlane"` Description string `json:"description"` InstallMonAgent string `json:"installMonAgent"` Label string `json:"label"` Name string `json:"name"` Worker []McksNodeConfig `json:"worker"` }
type McksConfig ¶
type McksConfig struct {
Kubernetes McksKubernetes `json:"kubernetes"`
}
type McksKubernetes ¶
type McksNode ¶
type McksNode struct { CreatedTime string `json:"createdTime"` Credential string `json:"credential"` Csp string `json:"csp"` CspLabel string `json:"cspLabel"` Kind string `json:"kind"` Name string `json:"name"` PublicIp string `json:"publicIp"` RegionLabel string `json:"regionLabel"` Role string `json:"role"` Spec string `json:"spec"` ZoneLabel string `json:"zoneLabel"` }
type McksNodeConfig ¶
type McksNodeList ¶
type McksNodeReq ¶
type McksNodeReq struct { ControlPlane []McksNodeConfig `json:"controlPlane"` Worker []McksNodeConfig `json:"worker"` }
type McksStatus ¶
Click to show internal directories.
Click to hide internal directories.