Skip to content

@oona/vlo / index / defineDomain

Function: defineDomain() ​

defineDomain(def): Domain

Defined in: sdk/ts/sdk/src/host/domain.ts:73

Groups one area's workflows, workers, activities and signals under a name, for createHost({ domains: [...] }).

Parameters ​

def ​

DomainDef

Returns ​

Domain

Example ​

ts
import { defineDomain } from "@oona/vlo";
import { brandActivities } from "./activities.ts";
import { brandResearch, brandWeekly } from "./workflows.ts";
import { brandWorker } from "./worker.ts";

export const brandDomain = defineDomain({
  name: "brand",
  workflows: [brandResearch, brandWeekly],
  workers: [brandWorker],
  activities: brandActivities,
});