@flowget/worker
v0.2.0
Published
Temporal-backed runtime worker for Flowget — the customer-facing executor that runs workflow graphs against a Temporal cluster. Ships the flowget-worker binary (filesystem registry discovery over REGISTRY_DIR) and the createWorker programmatic bring-your-
Maintainers
Readme
@flowget/worker
The Temporal-backed executor for Flowget workflows. It runs workflow graphs against a Temporal cluster — either as a ready-made worker binary that discovers your node registry from the filesystem, or as a programmatic API you embed in your own process with a registry you build.
Install
npm i @flowget/workerRequires a Temporal cluster and a peer install of @flowget/types,
@flowget/codec, and webpack.
Usage
Worker binary
Point REGISTRY_DIR at one or more directories laid out as
{nodes,decorators,deciders}/<name>/<name>.{ts,js} and run:
REGISTRY_DIR=./registry \
TEMPORAL_ADDRESS=your-namespace.tmprl.cloud:7233 \
TEMPORAL_NAMESPACE=your-namespace \
flowget-workerConfiguration is read from the environment (a local .env is auto-loaded);
see https://docs.flowget.io for the full variable reference, including mTLS and
end-to-end payload encryption.
Programmatic API
import { createWorker } from "@flowget/worker";
const { worker, dispose } = await createWorker({
connection: { address: "your-namespace.tmprl.cloud:7233" },
namespace: "your-namespace",
registry, // a NodeRegistry you assembled with buildRegistry
});
await worker.run();
await dispose();createWorkerFromRegistry is the filesystem variant, and runWorkflow starts
an execution and returns the Temporal handle. See the docs for the full API.
⚠️ 0.x is unstable
The surface is unstable until v1 — breaking changes ship as minor bumps. Pin
exact versions in consumers ("@flowget/worker": "0.1.0", not "^0.1.0").
Links
- Full documentation: https://docs.flowget.io
- License: FSL-1.1-ALv2 (see LICENSE)
