Documentation ¶
Index ¶
- Constants
- Variables
- func InitHbsClient()
- func InitRedisConnPool()
- func ParseConfig(cfg string)
- func PingRedis(c redis.Conn, t time.Time) error
- type AlarmConfig
- type GlobalConfig
- type HbsConfig
- type HttpConfig
- type RedisConfig
- type RpcConfig
- type SafeEventMap
- type SafeExpressionMap
- type SafeStrategyMap
- type SingleConnRpcClient
Constants ¶
View Source
const (
VERSION = "2.0.2"
)
change log 2.0.1: bugfix HistoryData limit 2.0.2: clean stale data
Variables ¶
View Source
var ( HbsClient *SingleConnRpcClient StrategyMap = &SafeStrategyMap{M: make(map[string][]model.Strategy)} ExpressionMap = &SafeExpressionMap{M: make(map[string][]*model.Expression)} LastEvents = &SafeEventMap{M: make(map[string]*model.Event)} )
View Source
var (
ConfigFile string
)
View Source
var RedisConnPool *redis.Pool
Functions ¶
func InitHbsClient ¶
func InitHbsClient()
func InitRedisConnPool ¶
func InitRedisConnPool()
func ParseConfig ¶
func ParseConfig(cfg string)
Types ¶
type AlarmConfig ¶
type AlarmConfig struct { Enabled bool `json:"enabled"` MinInterval int64 `json:"minInterval"` QueuePattern string `json:"queuePattern"` Redis *RedisConfig `json:"redis"` }
type GlobalConfig ¶
type GlobalConfig struct { Debug bool `json:"debug"` DebugHost string `json:"debugHost"` Remain int `json:"remain"` Http *HttpConfig `json:"http"` Rpc *RpcConfig `json:"rpc"` Hbs *HbsConfig `json:"hbs"` Alarm *AlarmConfig `json:"alarm"` }
func Config ¶
func Config() *GlobalConfig
type HttpConfig ¶
type RedisConfig ¶
type SafeEventMap ¶
type SafeExpressionMap ¶
type SafeExpressionMap struct { sync.RWMutex // metric:tag1 => [exp1, exp2 ...] // metric:tag2 => [exp1, exp2 ...] M map[string][]*model.Expression }
func (*SafeExpressionMap) Get ¶
func (this *SafeExpressionMap) Get() map[string][]*model.Expression
func (*SafeExpressionMap) ReInit ¶
func (this *SafeExpressionMap) ReInit(m map[string][]*model.Expression)
Click to show internal directories.
Click to hide internal directories.