Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertQueue ¶
type AlertQueue struct {
// contains filtered or unexported fields
}
func NewAlertQueue ¶
func NewAlertQueue(config CooldownConfig, handler func(*Alert) error) *AlertQueue
func (*AlertQueue) Enqueue ¶
func (q *AlertQueue) Enqueue(alert *Alert) bool
func (*AlertQueue) PendingCount ¶
func (q *AlertQueue) PendingCount() int
func (*AlertQueue) Start ¶
func (q *AlertQueue) Start()
func (*AlertQueue) Stop ¶
func (q *AlertQueue) Stop()
type CooldownConfig ¶
type CooldownConfig struct {
Period time.Duration `json:"period"`
MaxPending int `json:"max_pending"`
DrainInterval time.Duration `json:"drain_interval"`
SendDelay time.Duration `json:"send_delay"`
}
func DefaultCooldownConfig ¶
func DefaultCooldownConfig() CooldownConfig
Click to show internal directories.
Click to hide internal directories.