Documentation ¶
Index ¶
- Constants
- type Dao
- func (d *Dao) BusStatsKeys(c context.Context, bid int8) (prefix string, keys []string, err error)
- func (d *Dao) Close()
- func (d *Dao) GetAllRules(c context.Context, all bool) (rules []*monitor.Rule, err error)
- func (d *Dao) GetRule(c context.Context, tp, bid int8, id int64) (rule *monitor.Rule, err error)
- func (d *Dao) GetRules(c context.Context, tp, bid int8, all bool) (rules []*monitor.Rule, err error)
- func (d *Dao) RemMonitorStats(c context.Context, key string, oid int64) (err error)
- func (d *Dao) RuleIDIncKey(c context.Context) (id int64, err error)
- func (d *Dao) SetRule(c context.Context, rule *monitor.Rule) (err error)
- func (d *Dao) SetRuleState(c context.Context, tp, bid int8, id int64, state int8) (err error)
- func (d *Dao) StatsResult(c context.Context, key string, conf *monitor.RuleConf) (res *monitor.Stats, err error)
- func (d *Dao) StayOids(c context.Context, rule *monitor.Rule, keys []string) (oidMap map[int64]int, total int, err error)
Constants ¶
View Source
const (
FieldKeyFormat = "%d_%d_%d" //监控规则配置的Redis key中的field格式
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao is redis dao.
func (*Dao) BusStatsKeys ¶
BusStatsKeys 获取某业务统计的所有keys
func (*Dao) GetAllRules ¶
GetAllRules 获取所有规则
func (*Dao) GetRules ¶
func (d *Dao) GetRules(c context.Context, tp, bid int8, all bool) (rules []*monitor.Rule, err error)
GetRules 获取业务下的规则
func (*Dao) RemMonitorStats ¶
RemMonitorStats remove stay stats
func (*Dao) RuleIDIncKey ¶
RuleIDIncKey 自增配置id
func (*Dao) SetRuleState ¶
SetRuleState 修改监控规则的状态
Click to show internal directories.
Click to hide internal directories.