owpengram-server/internal/domain/update.go

21 lines
679 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package domain
// UpdateState 是账号的 update 状态pts/qts/seq/date
// 第一阶段空账号为零值;真实状态机属第二阶段。
type UpdateState struct {
Pts int
Qts int
Date int
Seq int
}
// UpdateStateCommitMode describes what a physically delivered update-state
// response proves. Every delivered baseline advances the device-local
// confirmed cursor; only an explicitly audited getState baseline also proves
// that retention may advance the client-observed cursor to the same point.
type UpdateStateCommitMode uint8
const (
UpdateStateCommitDeliveredOnly UpdateStateCommitMode = iota + 1
UpdateStateCommitDeliveredAndObservedBaseline
)