Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Observer Observer Notifiers []Notifier Repository StateRepository Logger *log.Logger }
type Observer ¶
type Observer interface {
Observe(context.Context, chan<- ObserverState)
}
Observer is responsible to send states of an occurring alert with true as the alert started and false when the alert is resolved.
type ObserverState ¶
type ObserverState bool
const ( Alert ObserverState = true Resolved ObserverState = false )
func (ObserverState) String ¶
func (o ObserverState) String() string
type StateRepository ¶
type StateRepository interface { Save(ctx context.Context, state ObserverState) error GetLatest(ctx context.Context) (ObserverState, error) }
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package mock_icof is a generated GoMock package.
|
Package mock_icof is a generated GoMock package. |
pkg
|
|
notifier/mock-email
Package mock_notifier is a generated GoMock package.
|
Package mock_notifier is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.