Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiConfig ¶
type ApiConfig struct { Enable bool Port string BasicAuth BasicAuthConfig `yaml:"basic_auth"` }
type BasicAuthConfig ¶
type Config ¶
type Config struct { Storage map[string]interface{} Rules []RuleConfig Alert map[string]interface{} ApiInfo ApiConfig `yaml:"api"` Test bool }
Config 全部配置
var (
OriginConfig *Config
)
func IntiConfig ¶
func IntiConfig(configDirInfo ConfigDirInfo) (config *Config, err error)
IntiConfig 根据配置文件路径加载配置
type ConfigDirInfo ¶
type ConfigError ¶
type ConfigError struct {
Message string
}
func (ConfigError) Error ¶
func (error ConfigError) Error() string
type RuleConfig ¶
type RuleConfig struct { Name string Status int Storage map[string]interface{} Script string Test TestRuleData Interval Time Alerts []map[string]interface{} }
RuleConfig 规则配置
func GetRuleConfig ¶
func GetRuleConfig(ruleDir string) (RuleConfig, error)
type TestRuleData ¶
Click to show internal directories.
Click to hide internal directories.