Example #1
0
File: forward.go Project: kiyoto/ik
func (factory *ForwardInputFactory) New(engine ik.Engine, attrs map[string]string) (ik.Input, error) {
	listen, ok := attrs["listen"]
	if !ok {
		listen = ""
	}
	netPort, ok := attrs["port"]
	if !ok {
		netPort = "24224"
	}
	bind := listen + ":" + netPort
	return newForwardInput(factory, engine.Logger(), bind, engine.DefaultPort())
}
Example #2
0
func (factory *StdoutOutputFactory) New(engine ik.Engine, attrs map[string]string) (ik.Output, error) {
	return newStdoutOutput(factory, engine.Logger())
}