LightRunClient
Defined in: src/runner/LightRunClient.ts:44
Constructors
Constructor
new LightRunClient(options?): LightRunClient;Defined in: src/runner/LightRunClient.ts:48
Parameters
options?
Returns
LightRunClient
Methods
createNetwork()
createNetwork(name, opts?): Promise<void>;Defined in: src/runner/LightRunClient.ts:219
Create a Docker network on the light-run host (POST /networks). Idempotent downstream: light-runner returns success whether it created the network or it already existed. Throws on a non-2xx response.
Parameters
name
string
opts?
iccEnabled?
boolean
Returns
Promise<void>
deleteNetwork()
deleteNetwork(name): Promise<void>;Defined in: src/runner/LightRunClient.ts:236
Delete a Docker network on the light-run host (DELETE /networks/:name). A 404 (already absent) resolves silently. A 409 (network still in use) throws, so teardown callers can log it without aborting the whole sweep.
Parameters
name
string
Returns
Promise<void>
fetchRunState()
fetchRunState(id): Promise<RunState>;Defined in: src/runner/LightRunClient.ts:268
Current state of a run (GET /runs/:id). Used to poll service readiness.
Parameters
id
string
Returns
Promise<RunState>
runNode()
runNode(
node,
input?,
options?): Execution;Defined in: src/runner/LightRunClient.ts:57
Parameters
node
input?
Record<string, unknown> = {}
options?
RunNodeOptions = {}
Returns
startDetached()
startDetached(body): Promise<string>;Defined in: src/runner/LightRunClient.ts:253
Start a long-running detached container (a service/sidecar) and return its light-run id, which is the container name and thus its DNS hostname on any attached network. Unlike runNode this never polls to completion: the service keeps running until stopRun() in the workflow teardown.
Parameters
body
Record<string, unknown>
Returns
Promise<string>
stopRun()
stopRun(id): Promise<void>;Defined in: src/runner/LightRunClient.ts:278
Gracefully stop a running container (POST /runs/:id/stop). A 404 (already gone) resolves silently so teardown is idempotent.
Parameters
id
string
Returns
Promise<void>
isAvailable()
static isAvailable(): boolean;Defined in: src/runner/LightRunClient.ts:53
Returns
boolean