Skip to main content

Module source

Module source 

Source
Expand description

The sync source contract (spec/sync/README.md §5): the in-engine view of an adapter — capabilities, enumerate/fetch, write/remove when it writes through, a watch stream of WatchEvents when it can watch (one Ready once the feed is primed, then Batches — §5 “Readiness”). Every call crosses a pipe in production (crate::external::ExternalSource); an in-memory source serves tests.

Structs§

MemSource
An in-memory source for tests: a path → content map with a configurable capability set; writes and removes are applied to the map and logged.
SourceCapabilities
The handshake’s capabilities.
SourceEntry
A member of the scope: its storage key and cheap change token.
SourceItem
A hydrated member: the entry plus its bytes.

Enums§

Readiness
How wait_ready ended.
SourceIdentity
How a source’s identity relates to omgbase block identity.
WatchEvent
One unsolicited line of a live watch, as the wire carries it (§5): {"event":"ready"} once the feed is primed, then {"event":"batch", "paths":[…]} per debounced batch of changed paths.

Traits§

SyncSource
The in-engine handle to a source.

Functions§

wait_ready
Wait up to patience for the stream’s Ready. Any Batch that arrives first is returned alongside, in order, so nothing the adapter reported before readiness is lost to the caller.