import { ServiceKey } from '@actor-system/receptionist'; import { Path } from './__bundle__/shared/dist/path.js'; declare module "@actor-system/core" { interface SystemConfig { readonly cluster?: ClusterConfig; } } interface ClusterConfig { readonly roles?: readonly string[]; /** * The address of the cluster coordinator node. */ readonly coordinator: Path.Hostname; readonly channelName?: string; readonly node?: { /** * Timeout in milliseconds to wait for a response from the coordinator * when joining the cluster. */ readonly joinTimeout?: number; }; } interface ClusterNode { readonly roles: readonly string[]; readonly path: Path.Hostname; } interface ClusterState { readonly nodes: Map; readonly actorsByService: Map>; } interface ReadonlyClusterState { readonly nodes: ReadonlyMap; readonly actorsByService: ReadonlyMap>; } export type { ClusterConfig, ClusterNode, ClusterState, ReadonlyClusterState };