mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-17 04:30:03 +02:00
20 lines
315 B
Go
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
|
|
}
|