Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

runtimeLayer.ts

27 lines1.2 KB

1import * as Layer from "effect/Layer";
2​
3import { OrchestrationCommandReceiptRepositoryLive } from "../persistence/Layers/OrchestrationCommandReceipts.ts";
4import { OrchestrationEventStoreLive } from "../persistence/Layers/OrchestrationEventStore.ts";
5import { OrchestrationEngineLive } from "./Layers/OrchestrationEngine.ts";
6import { OrchestrationProjectionPipelineLive } from "./Layers/ProjectionPipeline.ts";
7import { OrchestrationProjectionSnapshotQueryLive } from "./Layers/ProjectionSnapshotQuery.ts";
8​
9export const OrchestrationEventInfrastructureLayerLive = Layer.mergeAll(
10 OrchestrationEventStoreLive,
11 OrchestrationCommandReceiptRepositoryLive,
12);
13​
14export const OrchestrationProjectionPipelineLayerLive = OrchestrationProjectionPipelineLive.pipe(
15 Layer.provide(OrchestrationEventStoreLive),
16);
17​
18export const OrchestrationInfrastructureLayerLive = Layer.mergeAll(
19 OrchestrationProjectionSnapshotQueryLive,
20 OrchestrationEventInfrastructureLayerLive,
21 OrchestrationProjectionPipelineLayerLive,
22);
23​
24export const OrchestrationLayerLive = Layer.mergeAll(
25 OrchestrationInfrastructureLayerLive,
26 OrchestrationEngineLive.pipe(Layer.provide(OrchestrationInfrastructureLayerLive)),
27);