Documentation ¶
Index ¶
Constants ¶
const JSII_RUNTIME string = "JSII_RUNTIME"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process is a simple interface over the child process hosting the @jsii/kernel process. It only exposes a very straight-forward request/response interface.
func NewProcess ¶
NewProcess prepares a new child process, but does not start it yet. It will be automatically started whenever the client attempts to send a request to it.
If the JSII_RUNTIME environment variable is set, this command will be used to start the child process, in a sub-shell (using %COMSPEC% or cmd.exe on Windows; $SHELL or /bin/sh on other OS'es). Otherwise, the embedded runtime application will be extracted into a temporary directory, and used.
The current process' environment is inherited by the child process. Additional environment may be injected into the child process' environment - all of which with lower precedence than the launching process' environment, with the notable exception of JSII_AGENT, which is reserved.
func (*Process) Request ¶
Request starts the child process if that has not happened yet, then encodes the supplied request and sends it to the child process via the requests channel, then decodes the response into the provided response pointer. If the process is not in a usable state, or if the encoding fails, an error is returned.