feat: 初步集成 zabbix agent
This commit is contained in:
@ -8,8 +8,9 @@ import (
|
||||
)
|
||||
|
||||
type config struct {
|
||||
Server serverConfig `mapstructure:"server"`
|
||||
App appConfig `mapstructure:"app"`
|
||||
Server serverConfig `mapstructure:"server"`
|
||||
App appConfig `mapstructure:"app"`
|
||||
Integrations integrationConfig `mapstructure:"integrations"`
|
||||
}
|
||||
|
||||
type serverConfig struct {
|
||||
@ -21,6 +22,10 @@ type appConfig struct {
|
||||
URL string `mapstructure:"url"`
|
||||
}
|
||||
|
||||
type integrationConfig struct {
|
||||
ZabbixAgent IntegrationConfig `mapstructure:"zabbix_agent"`
|
||||
}
|
||||
|
||||
var Conf config
|
||||
|
||||
func LoadConfig() error {
|
||||
|
9
config/integration.go
Normal file
9
config/integration.go
Normal file
@ -0,0 +1,9 @@
|
||||
package config
|
||||
|
||||
type IntegrationConfig struct {
|
||||
Plugin PluginConfig `mapstructure:"plugin"`
|
||||
}
|
||||
|
||||
type PluginConfig struct {
|
||||
Name string `mapstructure:"name"`
|
||||
}
|
Reference in New Issue
Block a user