@ocap/types 1.31.4 → 1.31.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/interfaces/ledger.ts +16 -0
- package/package.json +1 -1
package/interfaces/ledger.ts
CHANGED
|
@@ -599,6 +599,22 @@ export interface IWriterLeaseConfig {
|
|
|
599
599
|
enabled: boolean;
|
|
600
600
|
holderId: string;
|
|
601
601
|
ttlMs?: number;
|
|
602
|
+
/**
|
|
603
|
+
* Automatically acquire the lease in `init()`, renew it periodically in the background,
|
|
604
|
+
* and release it on `close()`. Defaults to `false` so manual takeover tests and callers
|
|
605
|
+
* keep explicit control over `acquireLease` / `renewLease` / `releaseLease`.
|
|
606
|
+
*/
|
|
607
|
+
autoAcquire?: boolean;
|
|
608
|
+
/**
|
|
609
|
+
* Optional background renewal interval in ms when `autoAcquire` is `true`
|
|
610
|
+
* (defaults to `Math.max(1000, Math.floor(ttlMs / 3))`).
|
|
611
|
+
*/
|
|
612
|
+
renewIntervalMs?: number;
|
|
613
|
+
/**
|
|
614
|
+
* With `autoAcquire`, how long `init()` keeps retrying while another holder still owns the lease
|
|
615
|
+
* (e.g. the previous process during an upgrade). Defaults to 0: reject immediately.
|
|
616
|
+
*/
|
|
617
|
+
startupWaitMs?: number;
|
|
602
618
|
}
|
|
603
619
|
|
|
604
620
|
/**
|