Documentation ¶
Index ¶
- Variables
- func InitHbsClient()
- func InitRedisConnPool()
- func ParseConfig(cfg string)
- func PingRedis(c redis.Conn, t time.Time) error
- func VersionMsg() string
- type AlarmConfig
- type GlobalConfig
- type HbsConfig
- type HttpConfig
- type RedisConfig
- type RpcConfig
- type SafeEventMap
- type SafeExpressionMap
- type SafeFilterMap
- type SafeStrategyMap
- type SingleConnRpcClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BinaryName string Version string GitCommit string )
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)} FilterMap = &SafeFilterMap{M: make(map[string]string)} )
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)
func VersionMsg ¶
func VersionMsg() 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)
type SafeFilterMap ¶
func (*SafeFilterMap) Exists ¶
func (this *SafeFilterMap) Exists(key string) bool
func (*SafeFilterMap) ReInit ¶
func (this *SafeFilterMap) ReInit(m map[string]string)
type SafeStrategyMap ¶
type SingleConnRpcClient ¶
type SingleConnRpcClient struct { sync.Mutex RpcServers []string Timeout time.Duration CallTimeout time.Duration // contains filtered or unexported fields }
func (*SingleConnRpcClient) Call ¶
func (this *SingleConnRpcClient) Call(method string, args interface{}, reply interface{}) error
Click to show internal directories.
Click to hide internal directories.