feat(event-store): new :event-store module with interfaces only
ci / JVM build + tests (push) Failing after 1m54s
ci / JVM build + tests (push) Failing after 1m54s
Выделяет bounded-tail event log в отдельный KMP-модуль. Это **новый
контракт** (не замена :message-store-api/events/EventStore — тот пока жив).
**Двухуровневое хранилище событий**:
1. :event-store (этот PR) — короткий bounded tail, авто-TTL.
Для live SSE и recent replay (catchup после короткого disconnect).
2. :message-store-api (MessageStore) — полный audit log, никогда не
эвиктится. Source of truth для длинного disconnect / audit query.
**API**:
- append(Event) — put, идемпотентный по id
- events(after: Instant?): Flow<Event> — catchup + live в одном Flow
- earliestEventDate(): Instant? — для gap detection у клиента
**Чего НЕТ в API** (by design):
- delete/prune методов — TTL/cap eviction полностью на стороне impl.
Caller'ы не должны забыть вызвать cleanup (single source of truth).
- conversationId / type в Event — opaque payload, тип envelope'а
решает producer.
Пока interfaces only — implementations (InMemoryEventStore, persistent)
появятся в следующих коммитах. Никаких изменений в существующем
EventStore в :message-store-api, чтобы не ломать зависимости.
KMP targets: jvm + linuxX64 + mingwX64 (Apple auto-disabled на Linux).
Modules:
+ :event-store — новый, commonMain only, ~150 строк
This commit is contained in:
@@ -67,6 +67,11 @@ include(":memory-vector")
|
||||
// IO-зависимостей. Используется в тестах (быстрый setup, без JDBC) и будет
|
||||
// использоваться в Android-сборке (JVector/SQLite не подходят для ART out-of-box).
|
||||
include(":message-store-api")
|
||||
// Bounded-tail event log с auto-TTL. Двухуровневое хранилище: этот модуль —
|
||||
// короткий live tail + recent replay; полный audit log живёт в :message-store-api
|
||||
// (там — MessageStore + ConversationStore). EventStore сам управляет eviction,
|
||||
// никаких prune-методов наружу. KMP, без implementations пока.
|
||||
include(":event-store")
|
||||
include(":working-memory-api")
|
||||
include(":storage-bundle")
|
||||
include(":storage-inmemory")
|
||||
|
||||
Reference in New Issue
Block a user