Is Bash ready for more input?
Flag to mute log errors when this interpreter
is explicitly stop()
ed
The id of the current job.
Used to enable cancellation of jobs by checking that the job being cancelled is the current one.
A lock to prevent async event loops from attempting to enter code into the terminal at the same time.
Output from entering the last Bash input.
Used to buffer output from the pseudo-terminal.
Programming language names supported by this interpreter.
The prompt used to identify when the pseudo- terminal has finished executing and is ready for more input.
Servers that will listen on behalf of this executor and pass on requests to it.
The pseudo-terminal in which bash is executed.
Maximum time that the process will run.
Seconds of inactivity after which the listener stops.
Function to call when Bash is ready
Begin running a Node
.
This method keeps a document "running", usually to allow it to react
to changes within it. Compare this to execute()
which will not wait
and will simply execute all nodes in the document.
The document will keep running until the end()
method is called on it.
Usually this method is called with a SoftwareSession
as the
node
argument. However, it could also be called with another Node
type, e.g. an Article
, in which case the executor may begin it's
session
property, or default session if that property is missing.
The node to run, usually but not necessarily, a SoftwareSession
The Claims
made for the call
The node, with updated properties, after it has begun running
Build a Node
.
The node to build
The build node
A fallback implementation of one of the above methods.
Since this base executor has no capabilities, this method
simply throws a CapabilityError
. Derived classes, may
override this method, and /or one of the methods above.
Provided so that derived classes such as Client
, Delegator
and Queuer
can override a single method to provide their
functionality instead of having to implement each of the above methods.
The name of the method
Values of parameters (i.e. arguments)
Compile a Node
.
The node to compile
The compiled node
Decode content to a Node
.
The source of the content to decode
The format of the content
The decoded node
Encode a Node
in a format.
The node to encode
The destination for the encoded content
The format to encode
The encoded content, or the destination of the content.
End running a Node
.
The running node, usually but not necessarily, a SoftwareSession
The Claims
made for the call
The node, with updated properties, after it has ended running
Enter Bash code into the terminal and set up handler to process output.
Code to enter.
A promise resolving to the output.
Execute Bash code.
This method enters the code, parses the output and checks the exit code. If the exit code is non-zero it throws an error with the output.
Code to execute
A promise resolving to the output from the command.
Get the manifest of the executor.
Parse output from a command.
Attempts to parse the output as JSON. In the future, more advanced parsing such as parsing of fixed-width tables may be done.
Output string to parse
Call a pipeline of methods passing the result of each call as the first argument of the next call.
This method is a "meta" method that is used to chain together calls to other methods. When using a remote executor, it is more efficient than chaining those calls together "by hand" because it only involves one round trip request to the executor.
The node to pipe through methods
A list of method, parameters tuples to pipe the node through
The node after it has been piped through the methods
Register this listener so that it can be discovered by other executors.
The path to the registration file.
Run this executor
Starts listening with graceful shutdown on SIGINT
or SIGTERM
,
and checking for timeout (if set).
Start listening by starting all servers.
Any additional servers to start.
Start a Bash shell process.
Creates a pseudo-terminal and registers event handles on it to capture output and handle unexpected exit.
Generated using TypeDoc
The unique id of this executor.
Used for better tracing and to avoid duplicate entries for an executor (e.g. due to having multiple servers and therefore multiple addresses)