IOProxy is an interface to a particular implementation for initializing and copying the stdio of a process running in a VM. All its methods are unexported as they are used only internally. The interface exists just to give outside callers a choice of implementation when setting up a process.
| 33 | // to give outside callers a choice of implementation when setting up a |
| 34 | // process. |
| 35 | type IOProxy interface { |
| 36 | // start should begin initialization of stdio proxying for the provided |
| 37 | // process. It returns two channels, one to indicate io initialization |
| 38 | // is completed and one to indicate io copying is completed. |
| 39 | start(proc *vmProc) (ioInitDone <-chan error, ioCopyDone <-chan error) |
| 40 | |
| 41 | // Close the proxy. |
| 42 | Close() |
| 43 | |
| 44 | // IsOpen returns true if the proxy hasn't been closed. |
| 45 | IsOpen() bool |
| 46 | } |
| 47 | |
| 48 | // IOConnector is function that begins initializing an IO connection (i.e. |
| 49 | // vsock, FIFO, etc.). It returns a channel that should be published to with |
no outgoing calls
no test coverage detected