Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Stderr of the VM process written to this writer.
Stderr io.Writer
// Stdout of the VM process written to this writer.
Stdout io.Writer
// Duration engine server will wait for handshake success.
HandshakeTimeout time.Duration
Log log.Logger
}
Config contains subprocess configuration.
type Status ¶
Status contains subprocess status after successful bootstrap.
func Bootstrap ¶
func Bootstrap( ctx context.Context, listener net.Listener, cmd *exec.Cmd, config *Config, ) (*Status, runtime.Stopper, error)
Bootstrap starts a VM as a subprocess after initialization completes and pipes the IO to the appropriate writers.
This is the ZAP transport version which uses a simple binary handshake instead of gRPC.
The subprocess is expected to be stopped by the caller if a non-nil error is returned. If piping the IO fails then the subprocess will be stopped.
Click to show internal directories.
Click to hide internal directories.