From d3bb26b67ab25f46819ad624096f7bf90d7af530 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期三, 30 十月 2019 15:19:23 +0800 Subject: [PATCH] feat: add system info thresholds at config --- extend/config/config.go | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/extend/config/config.go b/extend/config/config.go index 4dd7ec8..605482a 100644 --- a/extend/config/config.go +++ b/extend/config/config.go @@ -6,6 +6,10 @@ "github.com/spf13/viper" ) +type threshold struct { + Value int `mapstructure: "value"` + Color string `mapstructure: "color"` +} type server struct { Runmode string `mapstructure: "runmode"` JwtSecret string `mapstructure: "jwtSecret"` @@ -22,7 +26,8 @@ ChannelCount string `mapstructure: "channelCount"` //閫氶亾涓暟 DiskCount string `mapstructure: "diskCount"` //纭洏涓暟 - SysServerPort string `mapstructure: "SysServerPort"` + SysServerPort string `mapstructure: "sysServerPort"` + SysThresholds []threshold `mapstructure: "sysThresholds"` } var Server = &server{} -- Gitblit v1.8.0