Documentation ¶
Index ¶
- func ConstructClusterResources(nodes []model.NodeInfo, nodeResources []model.ResourceInfo, queueName string) (map[string]*NodeResourcesResponse, error)
- func CreateOrDeleteClusterObject(ctx *logger.RequestContext, request ObjectRequest, action string) error
- func DeleteCluster(ctx *logger.RequestContext, clusterName string) error
- func GetClusterObject(ctx *logger.RequestContext, request *ObjectRequest) (interface{}, error)
- func InitDefaultCluster(clusterType string) error
- func IsLastClusterPk(ctx *logger.RequestContext, pk int64) bool
- func ListClusterQuota(ctx *logger.RequestContext, clusterNameList []string) (map[string]ClusterQuotaReponse, error)
- func ListClusterResources(ctx *logger.RequestContext, req ListClusterResourcesRequest) (map[string]*NodeResourcesResponse, error)
- func UpdateClusterObject(ctx *logger.RequestContext, clusterName string, ...) error
- type ClusterCommonInfo
- type ClusterQuotaReponse
- type CreateClusterRequest
- type CreateClusterResponse
- type GetClusterResponse
- type ListClusterRequest
- type ListClusterResourcesRequest
- type ListClusterResponse
- type NodeResourcesResponse
- type ObjectRequest
- type UpdateClusterReponse
- type UpdateClusterRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructClusterResources ¶ added in v0.14.6
func ConstructClusterResources(nodes []model.NodeInfo, nodeResources []model.ResourceInfo, queueName string) (map[string]*NodeResourcesResponse, error)
func CreateOrDeleteClusterObject ¶
func CreateOrDeleteClusterObject(ctx *logger.RequestContext, request ObjectRequest, action string) error
func DeleteCluster ¶
func DeleteCluster(ctx *logger.RequestContext, clusterName string) error
func GetClusterObject ¶
func GetClusterObject(ctx *logger.RequestContext, request *ObjectRequest) (interface{}, error)
func InitDefaultCluster ¶ added in v0.14.3
InitDefaultCluster init default cluster for single cluster environment
func IsLastClusterPk ¶
func IsLastClusterPk(ctx *logger.RequestContext, pk int64) bool
func ListClusterQuota ¶
func ListClusterQuota(ctx *logger.RequestContext, clusterNameList []string) (map[string]ClusterQuotaReponse, error)
根据clusterNameList列出其对应的cluster quota信息 如果clusterNameList为空,则返回所有集群的cluster quota信息
func ListClusterResources ¶ added in v0.14.6
func ListClusterResources(ctx *logger.RequestContext, req ListClusterResourcesRequest) (map[string]*NodeResourcesResponse, error)
ListClusterResources return the node resources in clusters, lists can be filtered by labels in pods or nodes
func UpdateClusterObject ¶
func UpdateClusterObject(ctx *logger.RequestContext, clusterName string, clusterObject map[string]interface{}) error
Types ¶
type ClusterCommonInfo ¶
type ClusterCommonInfo struct { ID string `json:"clusterId"` // 集群id Description string `json:"description"` // 集群描述 Endpoint string `json:"endpoint"` // 集群endpoint, 比如 http://10.11.11.47:8080 Source string `json:"source"` // 来源, 比如 OnPremise (内部部署)、AWS、CCE ClusterType string `json:"clusterType"` // 集群类型,比如kubernetes/local/yarn Version string `json:"version"` // 集群版本v1.16 Status string `json:"status"` // 集群状态,可选值为online, offline Credential string `json:"credential"` // 用于存储集群的凭证信息,比如k8s的kube_config配置 Setting string `json:"setting"` // 存储额外配置信息 NamespaceList []string `json:"namespaceList"` // 命名空间列表,json类型,如["ns1", "ns2"] }
type ClusterQuotaReponse ¶
type ClusterQuotaReponse struct { NodeQuotaInfoList []schema.NodeQuotaInfo `json:"nodeList"` Summary schema.QuotaSummary `json:"summary"` ErrMessage string `json:"errMsg"` }
type CreateClusterRequest ¶
type CreateClusterRequest struct { ClusterCommonInfo Name string `json:"clusterName"` // 集群名字 }
type CreateClusterResponse ¶
type CreateClusterResponse struct {
model.ClusterInfo
}
func CreateCluster ¶
func CreateCluster(ctx *logger.RequestContext, request *CreateClusterRequest) (*CreateClusterResponse, error)
type GetClusterResponse ¶
type GetClusterResponse struct {
model.ClusterInfo
}
func GetCluster ¶
func GetCluster(ctx *logger.RequestContext, clusterName string) (*GetClusterResponse, error)
type ListClusterRequest ¶
type ListClusterResourcesRequest ¶ added in v0.14.6
type ListClusterResponse ¶
type ListClusterResponse struct { common.MarkerInfo ClusterList []model.ClusterInfo `json:"clusterList"` }
func ListCluster ¶
func ListCluster(ctx *logger.RequestContext, marker string, maxKeys int, clusterNameList []string, clusterStatus string) (*ListClusterResponse, error)
type NodeResourcesResponse ¶ added in v0.14.6
type NodeResourcesResponse struct { Allocatable map[string]map[string]interface{} `json:"allocatable"` Capacity map[string]map[string]string `json:"capacity"` Labels map[string]map[string]string `json:"labels"` ClusterName string `json:"clusterName,omitempty"` QueueName string `json:"queueName,omitempty"` }
type ObjectRequest ¶
type UpdateClusterReponse ¶
type UpdateClusterReponse struct {
model.ClusterInfo
}
func UpdateCluster ¶
func UpdateCluster(ctx *logger.RequestContext, clusterName string, request *UpdateClusterRequest) (*UpdateClusterReponse, error)
type UpdateClusterRequest ¶
type UpdateClusterRequest struct {
ClusterCommonInfo
}
Click to show internal directories.
Click to hide internal directories.