@ocap/types 1.31.3 → 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 +19 -3
- package/package.json +1 -1
package/interfaces/ledger.ts
CHANGED
|
@@ -61,7 +61,7 @@ export interface ILedgerEntry {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Storage row type for ledger entries (used by adapters)
|
|
64
|
-
* Uses camelCase to match TypeScript conventions
|
|
64
|
+
* Uses camelCase to match TypeScript conventions
|
|
65
65
|
*/
|
|
66
66
|
export interface ILedgerEntryRow {
|
|
67
67
|
sequence: number;
|
|
@@ -131,7 +131,7 @@ export interface ICheckpoint {
|
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Storage row type for checkpoints (used by adapters)
|
|
134
|
-
* Uses camelCase to match TypeScript conventions
|
|
134
|
+
* Uses camelCase to match TypeScript conventions
|
|
135
135
|
*/
|
|
136
136
|
export interface ICheckpointRow {
|
|
137
137
|
height: number;
|
|
@@ -280,7 +280,7 @@ export interface IEntryHashPolicy {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
|
-
* Storage adapter interface - SQLite
|
|
283
|
+
* Storage adapter interface - SQLite implements this
|
|
284
284
|
*/
|
|
285
285
|
export interface ILedgerStorage {
|
|
286
286
|
/** Entry hash policy used by this storage for append/finalize (optional; absent = v2 everywhere). */
|
|
@@ -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
|
/**
|