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

ProviderRuntimeIngestion.ts

34 lines1.1 KB

1/**
2 * ProviderRuntimeIngestionService - Provider runtime ingestion service interface.
3 *
4 * Owns background workers that consume provider runtime streams and emit
5 * orchestration commands/events.
6 *
7 * @module ProviderRuntimeIngestionService
8 */
9import { ServiceMap } from "effect";
10import type { Effect, Scope } from "effect";
11​
12/**
13 * ProviderRuntimeIngestionShape - Service API for runtime ingestion lifecycle.
14 */
15export interface ProviderRuntimeIngestionShape {
16 /**
17 * Start ingesting provider runtime events into orchestration commands.
18 *
19 * The returned effect must be run in a scope so all worker fibers can be
20 * finalized on shutdown.
21 *
22 * Uses an internal queue and continues after non-interrupt failures by
23 * logging warnings.
24 */
25 readonly start: Effect.Effect<void, never, Scope.Scope>;
27​
28/**
29 * ProviderRuntimeIngestionService - Service tag for runtime ingestion workers.
30 */
31export class ProviderRuntimeIngestionService extends ServiceMap.Service<
32 ProviderRuntimeIngestionService,
33 ProviderRuntimeIngestionShape
34>()("t3/orchestration/Services/ProviderRuntimeIngestion/ProviderRuntimeIngestionService") {}