2017-08-09 08:45:45 +02:00
|
|
|
package receive
|
|
|
|
|
|
|
|
import (
|
2018-04-13 16:44:23 +02:00
|
|
|
"dev.sum7.eu/genofire/logmania/lib"
|
2017-10-25 00:36:16 +02:00
|
|
|
log "github.com/sirupsen/logrus"
|
2017-08-09 08:45:45 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var Register = make(map[string]ReceiverInit)
|
|
|
|
|
|
|
|
type Receiver interface {
|
|
|
|
Listen()
|
|
|
|
Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReceiverInit func(*lib.ReceiveConfig, chan *log.Entry) Receiver
|
|
|
|
|
|
|
|
func AddReceiver(name string, n ReceiverInit) {
|
|
|
|
Register[name] = n
|
|
|
|
}
|