Добавляет модуль :sync — generic cursor-journal событий.

EventStore/MutableEventStore (get с EventSeqResult.expired, push, dropAllBefore, clear, min/max курсоров) и ksqlite-реализация KSqliteMutableEventStore: кэш граничных курсоров, пагинация чтения, требование возрастающего курсора. Тесты на in-memory SQLite.
This commit is contained in:
2026-10-03 06:04:27 +03:00
parent 5bdc517988
commit 22a167ed03
11 changed files with 559 additions and 0 deletions
@@ -0,0 +1,14 @@
package pw.binom
import pw.binom.agentik.cursor.Cursor
interface MutableEventStore<EVENT> : EventStore<EVENT> {
fun push(event: Event<EVENT>) = push(event.data, event.seq)
fun push(event: EVENT, cursor: Cursor)
fun clear()
/**
* Удаляет все события ДО [cursor] включая сам [cursor]
*/
fun dropAllBefore(cursor: Cursor)
}