Documentation
¶
Overview ¶
Package sqlite provides the official durable SQLite implementation of the HumanLLM remote-worker Journal port.
Index ¶
Constants ¶
const ( // DefaultMaxPendingRecords and DefaultMaxPendingBytes gate each new // assignment or outbound event against all payload-retaining assignments, // events, and rejections. Settlement is never rejected by quota: an atomic // NACK move may temporarily add receipt/wrapper bytes above the configured // byte budget, after which no new payload is admitted until compaction brings // usage back below budget. Tombstones do not consume quota. DefaultMaxPendingRecords = 4096 DefaultMaxPendingBytes = int64(512 << 20) )
Variables ¶
var ( // ErrDatabaseInUse means another live process or Resource owns the same // file-backed Journal. Sharing one SQLite file between Journal instances is // deliberately unsupported. ErrDatabaseInUse = errors.New("HumanLLM worker Journal database is already held by another live owner") // ErrUnsupportedSchema rejects migration and accidental database sharing. // The adapter is pre-release and intentionally accepts only an empty database // or its exact current schema. ErrUnsupportedSchema = errors.New("unsupported HumanLLM worker Journal sqlite schema; use a dedicated database") )
Functions ¶
func Open ¶
Open constructs an owned SQLite Journal Resource. Config.Path may be an ordinary filesystem path or an independent :memory: database. Shared-memory SQLite DSNs are rejected because they cannot satisfy the adapter's single-owner lifecycle guarantee. ctx bounds construction only and is not retained.
Types ¶
type Config ¶
Config selects one dedicated worker Journal persistence identity and its live-payload budget. A zero quota selects the documented default. Quotas are operational rather than durable: reopening with a lower value is allowed; an existing over-budget backlog can always settle or compact, while new assignment/event records are rejected with workerws.ErrJournalLimit.