Documentation ¶
Index ¶
- func AddResource(data map[string]interface{}) error
- func AddTags(data map[string]interface{}) error
- func CheckMetricExist(guId string) (bool, error)
- func CloseDB()
- func DeleteResource(guId string) error
- func DeleteResources(guIds []string) error
- func DeleteTagInfos(guId string) error
- func ExistResourceByGuId(guId string) (bool, error)
- func GetResourceTotal(maps interface{}) (int, error)
- func InsertMetricInfo(data map[string]interface{}) error
- func Setup()
- func UpdateMetricInfo(guId string, data interface{}) error
- func UpdateStatus(guId string, data interface{}) error
- func UpdateSubNode(guId string, data interface{}) error
- func UpdateTags(data map[string]interface{}) error
- type CategoryName
- type CityResource
- type Metric
- type Model
- type Resource
- type ResourceDynamic
- type ResourceMetric
- type Tag
- type TypeCount
- type UtilizationInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMetricExist ¶
func DeleteTagInfos ¶
func InsertMetricInfo ¶
func UpdateMetricInfo ¶
Types ¶
type CategoryName ¶
type CategoryName struct {
Name string `json:"name"`
}
func GetDistinctCategoryNames ¶
func GetDistinctCategoryNames() ([]*CategoryName, error)
type CityResource ¶
func GetResourcesByCity ¶
func GetResourcesByCity() ([]CityResource, error)
type Resource ¶
type Resource struct { ID int `json:"id"` GuId string `json:"guId"` Description string `json:"description"` Status int `json:"status"` Area string `json:"area"` PreNode string `json:"preNode"` SubNode string `json:"subNode"` OType int `json:"oType"` Utilization int `json:"utilization"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` IsMonitor int `json:"isMonitor"` IsControl int `json:"isControl"` }
func GetResources ¶
获取资源列表
type ResourceDynamic ¶
type ResourceDynamic struct { ID int `json:"id"` GuId string `json:"guId"` Description string `json:"description"` Status int `json:"status"` Area string `json:"area"` PreNode string `json:"preNode"` SubNode string `json:"subNode"` OType int `json:"oType"` Utilization int `json:"utilization"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` IsMonitor int `json:"isMonitor"` IsControl int `json:"isControl"` SumNode int `json:"sumNode"` AliveNode int `json:"aliveNode"` }
type ResourceMetric ¶
type ResourceMetric struct { ID int `json:"id"` GuId string `json:"guId"` Description string `json:"description"` Status int `json:"status"` Area string `json:"area"` PreNode string `json:"preNode"` SubNode string `json:"subNode"` OType int `json:"oType"` Utilization int `json:"utilization"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` IsMonitor int `json:"isMonitor"` IsControl int `json:"isControl"` CpuSet string `json:"cpuSet"` CpuRatio float64 `json:"cpuRatio"` }
func GetTagGroupInfos ¶
func GetTagGroupInfos(maps map[string]interface{}) ([]*ResourceMetric, error)
type Tag ¶
type Tag struct { ID int `json:"id"` ResourceId int `json:"resourceId"` GuId string `json:"guId"` TagKey string `json:"tagKey"` TagType string `json:"tagType"` TagValue string `json:"tagValue"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` }
func GetDistinctTagInfos ¶
func GetTagInfos ¶
func GetTagInfosByGuId ¶
type UtilizationInfo ¶
func GetUtilizationInfos ¶
func GetUtilizationInfos(queryStrs []string) ([]UtilizationInfo, error)
Click to show internal directories.
Click to hide internal directories.