Documentation ¶
Index ¶
- Constants
- Variables
- func GetDynamicConfigRedis() (map[string][]*model.DynamicConfig, error)
- func GetExpressionsFromRedis() ([]*model.Expression, error)
- func GetGroupTemplateFromRedis() (map[int][]int, error)
- func GetHostFromRedis() (map[string]int, error)
- func GetHostGroupFromRedis() (map[int][]int, error)
- func GetHostServiceFromRedis() (map[string]string, error)
- func GetHostTemplateFromRedis() (map[int][]int, error)
- func GetLock(LockKey string, Timeout int64) bool
- func GetMonitoredHostFromRedis() (map[int]*model.Host, error)
- func GetPluginsFromRedis() (map[int][]string, error)
- func GetStrategiesFromRedis() (map[int]*model.Strategy, error)
- func GetTPLFromRedis() (map[int]*model.Template, error)
- func GetUnionStrategiesFromRedis() (map[int][]*model.Strategy, error)
- func Init()
- func SetDynamicConfig2Redis(m map[string][]*model.DynamicConfig)
- func SetExpressions2Redis(m []*model.Expression)
- func SetGroupTemplate2Redis(m map[int][]int)
- func SetHost2Redis(m map[string]int)
- func SetHostGroup2Redis(m map[int][]int)
- func SetHostService2Redis(m map[string]string)
- func SetHostTemplate2Redis(m map[int][]int)
- func SetMonitoredHost2Redis(m map[int]*model.Host)
- func SetPlugins2Redis(m map[int][]string)
- func SetStrategies2Redis(m map[int]*model.Strategy)
- func SetTPL2Redis(m map[int]*model.Template)
- func SetUnionStrategies2Redis(m map[int][]*model.Strategy)
- func WLock(LockKey string, Timeout int64) error
- func WUnlock(LockKey string)
Constants ¶
View Source
const ( HostKey = "host" // MonitoredHostKey = "monitored_host" // )
View Source
const ( GroupPluginsLockKey = "GroupPluginsLock" GroupTemplatesLockKey = "GroupTemplatesLock" HostGroupsMapLockKey = "HostGroupsMapLock" HostMapLockKey = "HostMapLock" TemplateCacheLockKey = "TemplateCacheLock" StrategiesLockKey = "StrategiesLock" HostTemplateIdsLockKey = "HostTemplateIdsLock" ExpressionCacheLockKey = "ExpressionCacheLock" MonitoredHostsLockKey = "MonitoredHostsLock" DynamicConfigLockKey = "DynamicConfigLock" HostServiceIdsLockKey = "HostServiceIdsLockKey" RedisDisTLockTimeOut = 55 GroupPluginsWLockKey = "GroupPluginsWLock" GroupTemplatesWLockKey = "GroupTemplatesWLock" HostGroupsMapWLockKey = "HostGroupsMapWLock" HostMapWLockKey = "HostMapWLock" TemplateCacheWLockKey = "TemplateCacheWLock" StrategiesWLockKey = "StrategiesWLock" HostTemplateIdsWLockKey = "HostTemplateIdsWLock" ExpressionCacheWLockKey = "ExpressionCacheWLock" MonitoredHostsWLockKey = "MonitoredHostsWLock" DynamicConfigWLockKey = "DynamicConfigWLock" HostServiceIdsWLockKey = "HostServiceIdsLockKey" )
View Source
const ( TemplateKey = "template" // TPLKey = "tpl" // HostTemplateKey = "host_template" )
View Source
const DynamicConfigKey = "dynamic_config" //
View Source
const ExpressionsKey = "expressions"
View Source
const GroupKeyPerfix = "group" //
View Source
const HostServiceKey = "host_Service"
View Source
const LockKey = "lock"
View Source
const PluginKey = "plugin" //
View Source
const SEP = "|||"
View Source
const StrategiesKey = "strategies" //
View Source
const TIMEOUT = 60 * 20
View Source
const UnionStrategiesKey = "union_strategies"
Variables ¶
View Source
var RedisCluster *redis.Cluster
Functions ¶
func GetDynamicConfigRedis ¶
func GetDynamicConfigRedis() (map[string][]*model.DynamicConfig, error)
从redis中获取hash map
func GetExpressionsFromRedis ¶
func GetExpressionsFromRedis() ([]*model.Expression, error)
从redis中获取hash map
func GetGroupTemplateFromRedis ¶
从redis中获取hash map
func GetHostServiceFromRedis ¶
从redis中获取hash map
func GetHostTemplateFromRedis ¶
从redis中获取hash map
func GetMonitoredHostFromRedis ¶
从redis中获取hash map
func GetStrategiesFromRedis ¶
从redis中获取hash map
func SetDynamicConfig2Redis ¶
func SetDynamicConfig2Redis(m map[string][]*model.DynamicConfig)
设置插件map到redis hash,数量级10,直接设置hash
func SetExpressions2Redis ¶
func SetExpressions2Redis(m []*model.Expression)
设置插件map到redis hash,数量级10,直接设置hash
func SetGroupTemplate2Redis ¶
设置插件map到redis hash,数量级10,直接设置hash
func SetHostGroup2Redis ¶
设置插件map到redis hash,数量级10,直接设置hash
func SetHostService2Redis ¶
func SetHostTemplate2Redis ¶
func SetMonitoredHost2Redis ¶
设置插件map到redis hash,数量级10,直接设置hash
func SetStrategies2Redis ¶
设置插件map到redis hash,数量级10,直接设置hash
func SetTPL2Redis ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.