mcks

package
v0.0.0-...-af453be Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 NewMcks

func NewMcks(namespace string) *Mcks

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) GetNode

func (self *Mcks) GetNode(clusterName, nodeName string) (*McksNode, 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 McksKubernetes struct {
	NetworkCni       string `json:"networkCni"`
	PodCidr          string `json:"podCidr"`
	ServiceCidr      string `json:"serviceCidr"`
	ServiceDnsDomain string `json:"serviceDnsDomain"`
}

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 McksNodeConfig struct {
	Connection string `json:"connection"`
	Count      int    `json:"count"`
	Spec       string `json:"spec"`
}

type McksNodeList

type McksNodeList struct {
	Kind  string     `json:"kind"`
	Items []McksNode `json:"items"`
}

type McksNodeReq

type McksNodeReq struct {
	ControlPlane []McksNodeConfig `json:"controlPlane"`
	Worker       []McksNodeConfig `json:"worker"`
}

type McksStatus

type McksStatus struct {
	Code    int    `json:"code"`
	Kind    string `json:"kind"`
	Message string `json:"message"`
}

type Model

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

Jump to

Keyboard shortcuts

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