Skip to main content

Module hub

Module hub 

Source
Expand description

Hub-side machinery: unwrap incoming LogEntries into real entities so aggregate queries and the dashboard see Tasks/StatusChanges/etc. (spec §Sync, hub leg).

Note this command never inspects entity types itself — emit_event_batch routes by item_type exactly like direct ingestion. The command exists because the hub keeps the journal (LogEntries carry the original content-addressed bytes the pull leg needs), and because it is the interposition point for LWW ordering: myko applies raw events in arrival order, so without the Applied guard an event synced late would clobber newer state that every CLI (which sorts the full log before replay) resolves correctly.

Structs§

ApplyLogEntry
Apply the event wrapped inside a LogEntry to this node’s stores, unless a newer event for the same entity was already applied (LWW by (created_at, event id), the same key materialize() sorts by). Idempotent: re-applying converges.
ApplyLogEntryArgs
LogEntryBucketIds
LogEntryBucketIdsOut
The ids inside one bucket — fetched only for buckets whose hashes differ.
LogEntryBuckets
LogEntryBucketsOut
Bucketed hash summary of a project’s LogEntry ids — the hub side of the Merkle-style sync comparison (see crate::merkle). Reactive: recomputes as entries arrive.
UnwrapLogEntries
Saga: every LogEntry SET (from CLI pushes or Postgres replay) is unwrapped into its inner event.