mdbc/breaker.go
2022-02-23 16:59:45 +08:00

22 lines
518 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package mdbc
// breakerDo db熔断相关的告警处理
// 熔断应该记录执行时间 和单位时间间隔内执行次数
// 这里执行时间已经记录 单位时间间隔内执行次数暂未统计
type breakerDo interface {
doReporter() string // 告警 返回告警内容
}
// BreakerReporter 告警器
type BreakerReporter struct {
reportTitle string
reportMsg string
reportErrorWrap error
breakerDo
}
// Report 告警向Slack发出告警信息
func (b *BreakerReporter) Report() {
}