CloseTarget
@rotorsoft/act-root / act/src / CloseTarget
Type Alias: CloseTarget
CloseTarget =
object
Defined in: libs/act/src/types/action.ts:923
Per-stream options for the archive-and-truncate (or restart-with- snapshot) operation.
See
IAct.close for the close-the-books API
Properties
archive?
readonlyoptionalarchive?: () =>Promise<void>
Defined in: libs/act/src/types/action.ts:936
Called before truncation while the stream is guarded (no concurrent writes).
Use app.query() or app.query_array() inside for pagination.
If it throws, the stream remains guarded but is not truncated.
On a windowed close (before set) there is no guard — the
callback archives the immutable pre-cutoff prefix, which concurrent
appends cannot change.
Returns
Promise<void>
before?
readonlyoptionalbefore?:Date
Defined in: libs/act/src/types/action.ts:944
Windowed close: prune events older than this cutoff instead of
closing the stream. The store deletes the prefix below the closest
safe __snapshot__ (created < before, capped at the min consumer
watermark) and keeps the snapshot + tail — no tombstone, no seed,
and the stream keeps accepting actions. No qualifying snapshot ⇒
the stream is skipped this cycle. Mutually exclusive with
restart.
restart?
readonlyoptionalrestart?:boolean
Defined in: libs/act/src/types/action.ts:929
When true, restart with a __snapshot__ of the final state.
When false/omitted, permanently close with a __tombstone__.
Mutually exclusive with before.
stream
readonlystream:string
Defined in: libs/act/src/types/action.ts:925
Stream name to close