Documentation ¶
Index ¶
- Variables
- type Checkpoint
- func (cp *Checkpoint) Equals(other *Checkpoint) bool
- func (cp *Checkpoint) Forward(other *Checkpoint) *Checkpoint
- func (cp *Checkpoint) IncreaseClientSeq(inc uint32) *Checkpoint
- func (cp *Checkpoint) NextClientSeq() *Checkpoint
- func (cp *Checkpoint) NextServerSeq(serverSeq uint64) *Checkpoint
- func (cp *Checkpoint) String() string
- func (cp *Checkpoint) SyncClientSeq(clientSeq uint32) *Checkpoint
Constants ¶
This section is empty.
Variables ¶
var Initial = New(0, 0)
Initial is the initial value of the checkpoint.
Max is the max value of the checkpoint.
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶
Checkpoint is used to determine the client received changes.
func New ¶
func New(serverSeq uint64, clientSeq uint32) *Checkpoint
New creates a new instance of Checkpoint.
func (*Checkpoint) Equals ¶
func (cp *Checkpoint) Equals(other *Checkpoint) bool
Equals returns whether the given checkpoint is equal to this checkpoint or not.
func (*Checkpoint) Forward ¶
func (cp *Checkpoint) Forward(other *Checkpoint) *Checkpoint
Forward updates the given checkpoint with those values when it is greater than the values of internal properties.
func (*Checkpoint) IncreaseClientSeq ¶
func (cp *Checkpoint) IncreaseClientSeq(inc uint32) *Checkpoint
IncreaseClientSeq creates a new instance with increased client sequence.
func (*Checkpoint) NextClientSeq ¶
func (cp *Checkpoint) NextClientSeq() *Checkpoint
NextClientSeq creates a new instance with next client sequence.
func (*Checkpoint) NextServerSeq ¶
func (cp *Checkpoint) NextServerSeq(serverSeq uint64) *Checkpoint
NextServerSeq creates a new instance with next server sequence.
func (*Checkpoint) String ¶
func (cp *Checkpoint) String() string
String returns the string of information about this checkpoint.
func (*Checkpoint) SyncClientSeq ¶
func (cp *Checkpoint) SyncClientSeq(clientSeq uint32) *Checkpoint
SyncClientSeq updates the given clientSeq if it is greater than the internal value.