logmania/input/main.go

19 lines
245 B
Go
Raw Normal View History

2018-09-05 01:53:23 +02:00
package input
import (
2019-06-20 09:25:43 +02:00
"github.com/bdlm/log"
2018-09-05 01:53:23 +02:00
)
var Register = make(map[string]Init)
type Input interface {
Listen()
Close()
}
type Init func(interface{}, chan *log.Entry) Input
func Add(name string, init Init) {
Register[name] = init
}