ReadFrom start a worker to read from this plugin
(plugin PluginReader)
| 66 | |
| 67 | // ReadFrom start a worker to read from this plugin |
| 68 | func (m *Middleware) ReadFrom(plugin PluginReader) { |
| 69 | Debug(2, fmt.Sprintf("[MIDDLEWARE] command[%q] Starting reading from %q", m.command, plugin)) |
| 70 | go m.copy(m.Stdin, plugin) |
| 71 | } |
| 72 | |
| 73 | func (m *Middleware) copy(to io.Writer, from PluginReader) { |
| 74 | var buf, dst []byte |