Skip to main content

Module codec

Module codec 

Source
Expand description

Value codecs. Structured values are serde_json behind a leading version byte (CODEC_V1); refs are the raw 32-byte id and integers are raw big-endian. Decoding an unknown version, a wrong length or a value that fails validation is StoreError::Corrupt.

Structs§

Backlog
Terminal outcome backlog. Relay rows are excluded.
BackupStateV1
The last consistent Worker snapshot of one partition. A zero export time and empty key mark a timer that has been seeded but has not fired yet.
EpochLease
The ref shard’s durable copy of its coordinator epoch lease.
LeaseRecovery
Declared coordinator recovery, retained until a later recovery overwrites it.
LeasedShard
The coordinator’s durable lease grant and installation acknowledgement.
NamespaceRecord
The namespace coordinator record. The first configuration version is 1.
OutcomeRef
A ref changed by a committed reservation.
RelayScanV1
Source-local scan progress. Every retained row at or below cursor belongs to a blocked target; new rows beyond cycle_end wait for the next cycle. The relay checkpoints this row under a guard on its prior value, atomically deleting delivered queue rows. Timer rescheduling is separate.
RelayV1
An idempotent relay of upserts and deletes to one partition.
RepoRecord
The repository coordinator record.
RepoVisibilityV1
A repository’s stored visibility (SPEC-WRITE-GRANTS §9.1). A missing rv row inherits the deployment default; the row may exist before rr does.
TicketV1
An open upload ticket. Its audience is bound by the shard’s deployment.

Enums§

AbortReason
The hooks protocol’s terminal abort reasons.
PendingOp
The operation a pending reservation will settle.
ReservationV1
The one durable reservation arbiter, replaced under an Equals guard.
StoredVisibility
The visibility values a rv row stores.

Constants§

CODEC_V1
Version byte of every structured value this binary writes.
MAX_BLOCKED_TARGETS
Maximum retained targets in a persistent relay scan cycle.

Functions§

decode_backlog
Decode the terminal outcome backlog.
decode_backup_state
Decode a per-partition Worker backup state.
decode_block_entry
Decode a blocklist entry.
decode_epoch_lease
Decode an epoch lease; namespace configuration versions start at 1.
decode_hold
Decode a ContentIndex GC hold’s expiry.
decode_holder
Decode a ContentIndex holder row.
decode_lease_recovery
Decode a declared lease-table recovery marker.
decode_leased_shard
Decode a coordinator lease-table row.
decode_namespace_record
Decode a namespace coordinator record. Configuration version zero is invalid: the namespace’s first version is 1.
decode_namespace_usage
Decode a fixed-width namespace counter, rejecting malformed rows.
decode_namespace_view
Decode a view and reject a contribution larger than the aggregate.
decode_object_index
Decode and validate a repository object-index value.
decode_object_state
Decode a ContentIndex object state.
decode_quota_state
Decode a quota window’s usage.
decode_ref_id
Decode a ref value.
decode_relay
Decode a relay target and its bounded idempotent operations.
decode_relay_scan
Decode source relay scan progress, rejecting malformed or unbounded state.
decode_replay_record
Decode a replay record.
decode_repo_record
Decode a repository coordinator record.
decode_repo_visibility
Decode a repository visibility row. The statement id is canonical: 64 lowercase hexadecimal digits.
decode_reservation
Decode a reservation; unknown states, identities and malformed outcomes fail closed.
decode_ticket
Decode an upload ticket, validating ref, reservation, geometry and lifetime.
decode_u32
Decode a be32 integer.
decode_u64
Decode a be64 integer.
encode_backlog
Encode the terminal outcome backlog.
encode_backup_state
Encode a per-partition Worker backup state.
encode_block_entry
Encode a blocklist entry.
encode_epoch_lease
Encode a ref shard epoch lease.
encode_hold
Encode a ContentIndex GC hold: its expiry, Unix ms.
encode_holder
Encode a ContentIndex holder row (R-131).
encode_lease_recovery
Encode a declared lease-table recovery marker.
encode_leased_shard
Encode a coordinator lease-table row.
encode_namespace_record
Encode a namespace coordinator record.
encode_namespace_usage
Two big-endian u64 counters, ops then bytes. Used by qs, qc and qt.
encode_namespace_view
Three usage fields and a read timestamp, each big-endian u64.
encode_object_index
Encode a repository object-index value. All integers are big-endian. Layout: version, frame offset/length (u64 each), wire type (u8), decoded size (u64), chain depth (u32), base-present (u8), optional base id.
encode_object_state
Encode a ContentIndex object state.
encode_quota_state
Encode a quota window’s usage.
encode_ref_id
A ref value: the raw 32-byte id.
encode_relay
Encode idempotent relay operations. A malformed target returns Invalid.
encode_relay_scan
Encode bounded, canonical source relay scan progress.
encode_replay_record
Encode a replay record.
encode_repo_record
Encode a repository coordinator record.
encode_repo_visibility
Encode a repository visibility row.
encode_reservation
Encode a pending, ticket-backed, or terminal reservation.
encode_ticket
Encode an upload ticket.
encode_u32
A be32 integer (the layout version).
encode_u64
A be64 integer (the grant epoch).
validate_ticket
Validate ticket semantics before opening or after decoding a row.