light-process
API referenceClasses

Node

Defined in: src/models/Node.ts:55

Implements

Constructors

Constructor

new Node(config): Node;

Defined in: src/models/Node.ts:71

Parameters

config

NodeConfig

Returns

Node

Properties

entrypoint

entrypoint: string | null;

Defined in: src/models/Node.ts:64

Implementation of

NodeJSON.entrypoint


env

env: string[];

Defined in: src/models/Node.ts:68

Names of environment variables to pass through from the server env to the container. Values are never serialized.

Implementation of

NodeJSON.env


files

files: CodeFiles;

Defined in: src/models/Node.ts:61

Implementation of

NodeJSON.files


id

readonly id: string;

Defined in: src/models/Node.ts:56

Implementation of

NodeJSON.id


image

image: string | null;

Defined in: src/models/Node.ts:62

Implementation of

NodeJSON.image


inputs

inputs: IOSchema | null;

Defined in: src/models/Node.ts:59

Implementation of

NodeJSON.inputs


name

name: string;

Defined in: src/models/Node.ts:57

Implementation of

NodeJSON.name


networks

networks: string[];

Defined in: src/models/Node.ts:67

Docker networks. Empty uses light-run default; first entry is the primary (Docker NetworkMode), the rest are connected after create.

Implementation of

NodeJSON.networks


outputs

outputs: IOSchema | null;

Defined in: src/models/Node.ts:60

Implementation of

NodeJSON.outputs


providesEnv

providesEnv: Record<string, string>;

Defined in: src/models/Node.ts:69

Literal env injected into the container. Values may contain ${service:<id>} placeholders, resolved to a service container's hostname at run time. Use this to point a workload at a sidecar (e.g. { "BASE_URL": "http://${service:proxy}:8080" }).

Implementation of

NodeJSON.providesEnv


setup

setup: string[];

Defined in: src/models/Node.ts:63

Shell commands executed before the entrypoint (e.g. 'pip install numpy')

Implementation of

NodeJSON.setup


timeout

timeout: number;

Defined in: src/models/Node.ts:66

Timeout in ms - 0 means no timeout

Implementation of

NodeJSON.timeout


type

type: NodeType;

Defined in: src/models/Node.ts:58

Implementation of

NodeJSON.type


workdir

workdir: string;

Defined in: src/models/Node.ts:65

Implementation of

NodeJSON.workdir

Methods

addFiles()

addFiles(files): this;

Defined in: src/models/Node.ts:97

Parameters

files

CodeFiles

Returns

this


addFolder()

addFolder(
   folderPath, 
   entrypoint, 
   options?): this;

Defined in: src/models/Node.ts:102

Parameters

folderPath

string

entrypoint

string

options?

LoadOptions

Returns

this


addHelper()

addHelper(language?): this;

Defined in: src/models/Node.ts:144

Add language helper (provides input and send). No arg = all helpers.

Parameters

language?

CodeLanguage

Returns

this


setCode()

setCode(fn): this;

Defined in: src/models/Node.ts:110

Set code from a JS function. Closures/external vars won't be available at runtime.

Parameters

fn

(...args) => unknown

Returns

this


toJSON()

toJSON(): NodeJSON;

Defined in: src/models/Node.ts:156

Returns

NodeJSON


fromJSON()

static fromJSON(json): Node;

Defined in: src/models/Node.ts:175

Parameters

json

NodeJSON

Returns

Node

On this page