예제 #1
0
파일: stdin.go 프로젝트: sheenobu/quicklog
func init() {

	fact = &factory{
		ch: make(chan ql.Buffer),
	}

	ql.RegisterInput("stdin", fact)
}
예제 #2
0
파일: udp.go 프로젝트: sheenobu/quicklog
func init() {
	ql.RegisterInput("udp", ql.InputFactoryHandler(func(r io.Reader) (ql.InputProcess, error) {
		var config Config
		if err := json.NewDecoder(r).Decode(&config); err != nil {
			return nil, err
		}
		return &Process{Config: config}, nil
	}))
}