hotalert/alert/dummy.go
2022-11-03 22:04:14 +02:00

19 lines
467 B
Go

package alert
import (
"context"
"hotalert/logging"
)
// DummyAlerter is an Alerter that does nothing. It is used when no actual alerter is available.
type DummyAlerter struct {
}
// NewDummyAlerter returns a new instance of DummyAlerter.
func NewDummyAlerter() *DummyAlerter {
return &DummyAlerter{}
}
func (d DummyAlerter) PostAlert(ctx context.Context, matchedKeywords []string) {
logging.SugaredLogger.Infof("DummyAlert: %v - %v", ctx, matchedKeywords)
}