NewHTTPInput constructor for HTTPInput. Accepts address with port which it will listen on.
(address string)
| 18 | |
| 19 | // NewHTTPInput constructor for HTTPInput. Accepts address with port which it will listen on. |
| 20 | func NewHTTPInput(address string) (i *HTTPInput) { |
| 21 | i = new(HTTPInput) |
| 22 | i.data = make(chan []byte, 1000) |
| 23 | i.stop = make(chan bool) |
| 24 | |
| 25 | i.listen(address) |
| 26 | |
| 27 | return |
| 28 | } |
| 29 | |
| 30 | // PluginRead reads message from this plugin |
| 31 | func (i *HTTPInput) PluginRead() (*Message, error) { |