chore: refresh gramsrv public release
This commit is contained in:
parent
75cebe8dbf
commit
70b6820474
1274 changed files with 378751 additions and 59919 deletions
|
|
@ -9,14 +9,11 @@ import (
|
|||
// UpdateEventStore 持久化 user 维度的增量事件。
|
||||
type UpdateEventStore interface {
|
||||
Append(ctx context.Context, userID int64, event domain.UpdateEvent) error
|
||||
AppendAllocated(ctx context.Context, userID int64, event domain.UpdateEvent) (domain.UpdateEvent, error)
|
||||
ListAfter(ctx context.Context, userID int64, pts, limit int) ([]domain.UpdateEvent, error)
|
||||
Current(ctx context.Context, userID int64) (int, error)
|
||||
// MaxContiguousPts 返回从 1 起无空洞的最大已提交 pts。
|
||||
// 并发发送在途时(pts 已分配未提交)会暂时小于 Current(最大已提交),空洞提交/补洞后回升。
|
||||
// getState/getDifference 据此只暴露连续 pts,避免客户端跳过在途空洞而丢消息。
|
||||
// MaxContiguousPts 返回账号已提交 pts 水位。PG 实现把 pts 分配与事件写入放在
|
||||
// 同一事务边界内,因此该水位就是 durable log 的连续水位。
|
||||
MaxContiguousPts(ctx context.Context, userID int64) (int, error)
|
||||
// AdvanceContiguousPts 推进并返回账号级连续 pts 水位。实现应在写事件的同一事务内调用。
|
||||
AdvanceContiguousPts(ctx context.Context, userID int64) (int, error)
|
||||
}
|
||||
|
||||
// EventCursor 精确定位单条账号事件,用于 outbox worker 批量加载已 claim 事件。
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue