1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-17 04:30:03 +02:00
thalos/app/service/notifier/notifier.go
2023-03-08 15:52:10 +01:00

20 lines
315 B
Go

package notifier
import (
"github.com/nikoksr/notify"
)
type NotifierInit func() (notify.Notifier, error)
func InitNotifier(initializers ...NotifierInit) error {
for _, init := range initializers {
notifier, err := init()
if err != nil {
return err
}
notify.UseServices(notifier)
}
return nil
}