process

package
v1.49.0-go-generics.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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

func NewProcess(compatibleVersions string) (*Process, error)

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) Close

func (p *Process) Close()

func (*Process) Request

func (p *Process) Request(request interface{}, response interface{}) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL