代码拉取完成,页面将自动刷新
package monitor
import (
"github.com/rancher/norman/types"
)
const (
ResourceNode = "node"
ResourceCluster = "cluster"
ResourceEtcd = "etcd"
ResourceAPIServer = "apiserver"
ResourceScheduler = "scheduler"
ResourceControllerManager = "controllermanager"
ResourceIngressController = "ingressController"
ResourceFluentd = "fluentd"
ResourceWorkload = "workload"
ResourcePod = "pod"
ResourceContainer = "container"
)
const (
queryAction = "query"
querycluster = "querycluster"
queryproject = "queryproject"
listclustermetricname = "listclustermetricname"
listprojectmetricname = "listprojectmetricname"
)
func GraphFormatter(apiContext *types.APIContext, resource *types.RawResource) {
resource.AddAction(apiContext, queryAction)
}
func QueryGraphCollectionFormatter(apiContext *types.APIContext, collection *types.GenericCollection) {
collection.AddAction(apiContext, queryAction)
}
func MetricFormatter(apiContext *types.APIContext, resource *types.RawResource) {
resource.AddAction(apiContext, querycluster)
resource.AddAction(apiContext, queryproject)
resource.AddAction(apiContext, listclustermetricname)
resource.AddAction(apiContext, listprojectmetricname)
}
func MetricCollectionFormatter(apiContext *types.APIContext, collection *types.GenericCollection) {
collection.AddAction(apiContext, querycluster)
collection.AddAction(apiContext, queryproject)
collection.AddAction(apiContext, listclustermetricname)
collection.AddAction(apiContext, listprojectmetricname)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。