Exemplo n.º 1
0
Arquivo: forward.go Projeto: 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())
}
Exemplo n.º 2
0
func (factory *StdoutOutputFactory) New(engine ik.Engine, attrs map[string]string) (ik.Output, error) {
	return newStdoutOutput(factory, engine.Logger())
}