MCPcopy Create free account
hub / github.com/CodeForBreakfast/eventsourcing / publishEvents

Function publishEvents

examples/todo-app/src/cli.ts:37–38  ·  view source on GitHub ↗
(todoId: TodoId, events: ReadonlyArray<TodoEvent>)

Source from the content-addressed store, hash-verified

35 pipe(events, Effect.forEach(eventBus.publish(todoId)));
36
37const publishEvents = (todoId: TodoId, events: ReadonlyArray<TodoEvent>) =>
38 pipe(EventBus, Effect.flatMap(publishEventsWithBus(todoId, events)));
39
40const commitTodoEvents = (
41 todoId: TodoId,

Callers 1

commitAndPublishFunction · 0.85

Calls 1

publishEventsWithBusFunction · 0.85

Tested by

no test coverage detected