Documentation ¶
Index ¶
- func CompareArrByPosition(arr1 []int, arr2 []int) int
- func Reload()
- func TimeIsBlock(t time.Time, startTime time.Time, endTime time.Time) bool
- func TimeIsEveryday(t time.Time, startTime time.Time, endTime time.Time) bool
- func TimeIsOffDay(time time.Time) bool
- type AlertConfig
- type AlertHandler
- type AlertMessage
- type Alerter
- type Context
- type Interval
- type ReloadHandler
- type Silence
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareArrByPosition ¶
CompareArrByPosition arr1>arr2 return 1, arr1<arr2 return 1, arr1=arr2 return 0
func TimeIsOffDay ¶
Types ¶
type AlertConfig ¶
type AlertHandler ¶
type AlertHandler func(message *AlertMessage, ctx *Context)
type AlertMessage ¶
type Alerter ¶
type Alerter interface { Receive(msg *AlertMessage) error AlertHandlerRegister(handler AlertHandler) AlertIntervalRegister(name string, interval *Interval) AlertSilenceRegister(name string, silence *Silence) ReloadHandlerRegister(handler ReloadHandler) Reload() Run() }
func GetAlerter ¶
func GetAlerter() Alerter
func GetAlerterSingle ¶
func GetAlerterSingle() Alerter
func NewAlerterSingle ¶
func NewAlerterSingle(c *AlertConfig) Alerter
type ReloadHandler ¶
type ReloadHandler func(alert Alerter)
Click to show internal directories.
Click to hide internal directories.