Documentation
¶
Overview ¶
Package sqlite provides the official durable SQLite implementation of the Agent remote-worker Journal port.
Index ¶
Constants ¶
const ( // DefaultMaxPendingRecords and DefaultMaxPendingBytes bound all Journal // records which still retain payloads: assignments, outbound events, and // application-facing rejections. Tombstones do not consume the 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("Agent 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 Agent 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.