perf: sync protocol and core hardening updates
This commit is contained in:
parent
152fed3b87
commit
4390ebf5a9
283 changed files with 29231 additions and 2295 deletions
18
internal/store/album_group.go
Normal file
18
internal/store/album_group.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"telesrv/internal/domain"
|
||||
)
|
||||
|
||||
// AlbumGroupStore 持久化 sendMultiMedia 的预发送分组预留。
|
||||
//
|
||||
// ReserveAlbumGroup 必须原子满足:
|
||||
// - 请求内没有旧绑定时,全部 random_id 绑定 ProposedGroupedID;
|
||||
// - 命中唯一旧 grouped_id 时,全部缺失项收敛到该旧值;
|
||||
// - 命中多个旧 grouped_id 时返回 domain.ErrMessageRandomIDDuplicate,且不写入;
|
||||
// - 并发、多实例的重叠请求等价于某个串行顺序。
|
||||
type AlbumGroupStore interface {
|
||||
ReserveAlbumGroup(ctx context.Context, req domain.AlbumGroupReservationRequest) (groupedID int64, err error)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue