/** * group-settings.ts, the `cluster.*` settings the group layer reads. * * Kept apart from settings.ts (which resolves the election's timing) so the two * concerns can be changed independently, and so a consumer that only wants one * of them does not pull in the other. * * Every value is CLAMPED rather than rejected. A daemon that refuses to * participate because someone typed `keyRotationHours: 0` is worse than one * that uses a sane floor and says what it did in the log. */ /** Resolved group-layer settings. */ export interface ClusterGroupSettings { /** * Whether this machine takes part at all. * * The same `cluster.enabled` the election reads. With it off, the group layer * opens no socket, sends no beacon and runs no timers, it only reads what is * already stored, so `cluster status`, `cluster key` and `cluster nodes` can * still answer honestly about a group this machine belongs to but is not * currently participating in. */ readonly enabled: boolean; /** How often the internal group key is replaced, in hours. */ readonly keyRotationHours: number; /** How long both generations are accepted around a rotation, in minutes. */ readonly keyRotationGraceMinutes: number; /** How often this node advertises its group on the network, in seconds. */ readonly beaconSeconds: number; /** How often the member list is gossiped to the group, in seconds. */ readonly rosterGossipSeconds: number; } export declare const DEFAULT_CLUSTER_GROUP_SETTINGS: ClusterGroupSettings; /** Normalize a raw `cluster` config category into resolved group settings. */ export declare function resolveClusterGroupSettings(raw: unknown): ClusterGroupSettings; /** Rotation interval in ms. */ export declare function keyRotationMs(settings: ClusterGroupSettings): number; /** Dual-generation acceptance window in ms. */ export declare function keyRotationGraceMs(settings: ClusterGroupSettings): number; //# sourceMappingURL=group-settings.d.ts.map