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

ProviderHealth.ts

22 lines698 Bytes

1/**
2 * ProviderHealth - Provider readiness snapshot service.
3 *
4 * Owns startup-time provider health checks (install/auth reachability) and
5 * exposes the cached results to transport layers.
6 *
7 * @module ProviderHealth
8 */
9import type { ServerProviderStatus } from "@t3tools/contracts";
10import { ServiceMap } from "effect";
11import type { Effect } from "effect";
12​
13export interface ProviderHealthShape {
14 /**
15 * Read provider health statuses computed at server startup.
16 */
17 readonly getStatuses: Effect.Effect<ReadonlyArray<ServerProviderStatus>>;
19​
20export class ProviderHealth extends ServiceMap.Service<ProviderHealth, ProviderHealthShape>()(
21 "t3/provider/Services/ProviderHealth",
22) {}