- Added Redis Streams operations to the message bus interface and implementation. - Introduced StreamCheckpoint model to track last processed stream entry per document. - Implemented UpsertStreamCheckpoint and GetStreamCheckpoint methods in the Postgres store. - Created document_update_history table for storing update payloads for recovery and replay. - Developed update persist worker to handle Redis Stream updates and persist them to Postgres. - Enhanced Docker Compose configuration for Redis with persistence. - Updated frontend API to support fetching document state with optional share token. - Added connection stability monitoring in the Yjs document hook.
16 lines
353 B
Go
16 lines
353 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// StreamCheckpoint tracks the last processed Redis Stream entry per document
|
|
type StreamCheckpoint struct {
|
|
DocumentID uuid.UUID `json:"document_id"`
|
|
LastStreamID string `json:"last_stream_id"`
|
|
LastSeq int64 `json:"last_seq"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|