| 1 | import type { ProviderDriverKind, ProviderInstanceId, ServerProvider } from "@t3tools/contracts"; |
| 2 | import type * as Stream from "effect/Stream"; |
| 3 | import type { ManagedServerProvider } from "@t3tools/provider-core/server/snapshot"; |
| 4 | |
| 5 | export type ProviderSnapshotSource = { |
| 6 | /** |
| 7 | * Routing key — uniquely identifies this instance in the aggregated |
| 8 | * snapshot list. Two different snapshot sources may share the same |
| 9 | * driver kind (multiple instances of the same driver). |
| 10 | */ |
| 11 | readonly instanceId: ProviderInstanceId; |
| 12 | /** Driver implementation kind. */ |
| 13 | readonly driverKind: ProviderDriverKind; |
| 14 | readonly getSnapshot: ManagedServerProvider["getSnapshot"]; |
| 15 | readonly refresh: ManagedServerProvider["refresh"]; |
| 16 | readonly streamChanges: Stream.Stream<ServerProvider>; |
| 17 | }; |