RepositoryExportSession
The verification state of one logical export stream.
A resumed request carries no header, and its trailer covers only the rows of that segment — the server cannot know what a client already read. So the session keeps two hashers: a per-segment one, which each segment’s trailer is checked against, and a whole-stream one, which accumulates across every segment and is what the caller should record as the export’s content digest. For a stream that never broke the two agree, and the trailer proves both.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RepositoryExportSession():
RepositoryExportSession
Returns
Section titled “Returns”RepositoryExportSession
Accessors
Section titled “Accessors”header
Section titled “header”Get Signature
Section titled “Get Signature”get header(): {
kind:"header";formatVersion:3;repo:string;mode:"heads"|"ops";sinceRepoSeq:number;atRepoSeq:number; } |undefined
The header of the opening segment; resumed segments repeat none.
Returns
Section titled “Returns”{ kind: "header"; formatVersion: 3; repo: string; mode: "heads" | "ops"; sinceRepoSeq: number; atRepoSeq: number; } | undefined
lastDurableId
Section titled “lastDurableId”Get Signature
Section titled “Get Signature”get lastDurableId():
string|undefined
Cursor for afterDurableId when resuming a broken stream.
Returns
Section titled “Returns”string | undefined
rowCount
Section titled “rowCount”Get Signature
Section titled “Get Signature”get rowCount():
number
Rows verified so far across every segment.
Returns
Section titled “Returns”number
segmentRowCount
Section titled “segmentRowCount”Get Signature
Section titled “Get Signature”get segmentRowCount():
number
Rows verified in the segment currently being read.
Returns
Section titled “Returns”number
contentSha256
Section titled “contentSha256”Get Signature
Section titled “Get Signature”get contentSha256():
string|undefined
The whole logical stream’s content digest, available once the stream has
been finalized — by its closing trailer, or by finalizeContentSha256.
Returns
Section titled “Returns”string | undefined
complete
Section titled “complete”Get Signature
Section titled “Get Signature”get complete():
boolean
Whether this session’s trailer has been verified.
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”finalizeContentSha256()
Section titled “finalizeContentSha256()”finalizeContentSha256():
string
End the session early and read the digest of what was verified. Useful when a stream will not be resumed; the session cannot be read from again.
Returns
Section titled “Returns”string