Files
cloudpods/pkg/mcclient/modules/mod_suggestsysrule.go
T
zhaoxiangchun ad0c063fb9 chore(monitor): delete suggestion files
1. 移除优化建议相关内容
2. mcclient中新增baseManager:SuggestionManager,修改优化建议相关的manager
2020-12-04 19:28:23 +08:00

78 lines
2.0 KiB
Go

// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package modules
import (
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
)
var (
SuggestSysRuleManager *SSuggestSysRuleManager
SuggestSysAlertManager *SSuggestSysAlertManager
InfluxdbShemaManager *SInfluxdbShemaManager
)
func init() {
SuggestSysRuleManager = NewSuggestSysRuleManager()
SuggestSysAlertManager = NewSuggestSysAlertManager()
InfluxdbShemaManager = NewInfluxdbShemaManager()
for _, m := range []modulebase.IBaseManager{
SuggestSysRuleManager,
SuggestSysAlertManager,
InfluxdbShemaManager,
} {
Register(m)
}
}
type SSuggestSysRuleManager struct {
*modulebase.ResourceManager
}
type SSuggestSysAlertManager struct {
*modulebase.ResourceManager
}
type SInfluxdbShemaManager struct {
*modulebase.ResourceManager
}
func NewSuggestSysRuleManager() *SSuggestSysRuleManager {
man := NewSuggestionManager("suggestsysrule", "suggestsysrules",
[]string{"id", "name", "type", "enabled", "period", "time_from", "setting"},
[]string{})
return &SSuggestSysRuleManager{
ResourceManager: &man,
}
}
func NewSuggestSysAlertManager() *SSuggestSysAlertManager {
man := NewSuggestionManager("suggestsysalert", "suggestsysalerts",
[]string{"id", "name", "type", "res_id", "monitor_config"},
[]string{})
return &SSuggestSysAlertManager{
ResourceManager: &man,
}
}
func NewInfluxdbShemaManager() *SInfluxdbShemaManager {
man := NewSuggestionManager("influxdbshema", "influxdbshemas",
[]string{},
[]string{})
return &SInfluxdbShemaManager{
ResourceManager: &man,
}
}