import { Keys } from "./keys.js"; import { Transport } from "./proxy.js"; import { WorldNamespace } from "./registry.js"; import { createPinboard } from "./server.js"; import { Resolution, World } from "./placement.js"; import { createLease } from "./license.js"; import { createOutlierDetector } from "./outlier.js"; //#region src/durability.d.ts type RedisKV = createPinboard.RedisKV; type DurabilitySweep = { sweepOnce(): Promise; start(): void; close(): Promise; }; declare namespace createDurabilitySweep { type Deps = { redis: RedisKV; keys: Keys; resolve(world: World, ns: string, id: string): Promise; worlds(): Promise; leaseTtlMs: number; now?: (() => number) | undefined; fetch?: Transport.FetchLike | undefined; outlier?: createOutlierDetector.Instance | undefined; }; } /** * The `{0}:sweeper` lease holder's loop: drains the overwritten lists * (`_wake` each entry; a 200 proves the instance alive and drops it), * re-claims dead-owner placements through the resolve script (which feeds the * lists), GCs dead worker records / ns_workers entries / lapsed drain * configs, and pages the DurabilityStore's marked rows into placeholder * rows so a wiped Redis re-places every in-flight activity. Without a store * there is nothing to resurrect: the overwritten lists are deleted, dead-owner * rows are evicted, and only the GC remains. */ declare const createDurabilitySweep: (deps: createDurabilitySweep.Deps, options: createPinboard.DurabilityOptions, lease?: createLease.Instance) => DurabilitySweep; //#endregion export { DurabilitySweep, createDurabilitySweep }; //# sourceMappingURL=durability.d.ts.map