Documentation ¶
Index ¶
Constants ¶
View Source
const DisabledService = dummyService(0)
DisabledService is a Dead man switch service that doesn't do anything.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { CustomChatID string Interval time.Duration Notifiers []forward.Notifier Logger log.Logger }
Config is the Service configuration.
type Service ¶
type Service interface { // PushSwitch will disable the dead man's switch when it's pushed and reset // the interval for activation. PushSwitch(ctx context.Context, alertGroup *model.AlertGroup) error }
Service is a Dead man's switch
A dead man's switch is a process where at regular intervals if some kind of signal is not received it will be activated. This usually is used to check that some kind of system is working, in this case if we don't receive an alert we assume that something is not working and we should notify.
func NewMeasureService ¶ added in v0.2.1
func NewMeasureService(rec ServiceMetricsRecorder, next Service) Service
NewMeasureService wraps a service and measures using metrics.
Click to show internal directories.
Click to hide internal directories.