Middleware represents a middleware object
| 15 | |
| 16 | // Middleware represents a middleware object |
| 17 | type Middleware struct { |
| 18 | command string |
| 19 | data chan *Message |
| 20 | Stdin io.Writer |
| 21 | Stdout io.Reader |
| 22 | commandCancel context.CancelFunc |
| 23 | stop chan bool // Channel used only to indicate goroutine should shutdown |
| 24 | closed bool |
| 25 | mu sync.RWMutex |
| 26 | } |
| 27 | |
| 28 | // NewMiddleware returns new middleware |
| 29 | func NewMiddleware(command string) *Middleware { |
nothing calls this directly
no outgoing calls
no test coverage detected