Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TelegramThrottle ¶
TelegramThrottle throttle for telegram monitor
func NewTelegramThrottle ¶
func NewTelegramThrottle(ctx context.Context, cfg *TelegramThrottleCfg) (t *TelegramThrottle, err error)
NewTelegramThrottle create new TelegramThrottle
func (*TelegramThrottle) Allow ¶
func (t *TelegramThrottle) Allow(alertType string) (ok bool)
Allow is allow alertType to push
type TelegramThrottleCfg ¶
type TelegramThrottleCfg struct {
TotleNPerSec, TotleBurst int
EachTitleNPerSec, EachTitleBurst int
}
TelegramThrottleCfg configuration for TelegramThrottle
Click to show internal directories.
Click to hide internal directories.