logmania/notify/main.go

20 lines
334 B
Go
Raw Normal View History

2017-06-16 10:33:35 +02:00
package notify
import (
"github.com/genofire/logmania/database"
"github.com/genofire/logmania/lib"
)
var NotifyRegister []NotifyInit
type Notifier interface {
Send(entry *database.Entry)
Close()
}
type NotifyInit func(*lib.NotifyConfig) Notifier
func AddNotifier(n NotifyInit) {
NotifyRegister = append(NotifyRegister, n)
}