Documentation
¶
Overview ¶
Package memledger provides a concurrent in-memory reference implementation of tool.ReadLedger (ADR 0294). It is the default a Workspace selects when no durable ledger is configured, and the offline fixture the shared engine/adapter/ledgerconformance suite validates. It never returns tool.ErrLedgerUnavailable: an in-memory map cannot go unavailable or corrupt, so RecordRead/RecordedVersion only ever succeed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
Ledger is a concurrency-safe in-memory tool.ReadLedger. Each Ledger instance is an independent evidence scope: two Ledgers never share state, which is what lets two Workspaces over one file-content backend select two isolated ledgers (ADR 0294 Scenario 1).
func (*Ledger) RecordRead ¶
RecordRead stores a valid version under key. It performs no file-content I/O.
func (*Ledger) RecordedVersion ¶
RecordedVersion returns the version previously recorded for key. ok is false when key was never recorded; err is always nil (an in-memory map has no unavailable/corrupt state to report).