Documentation ¶
Overview ¶
Package eventtoken includes utility methods for event token handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fresher ¶
func Fresher(ev1, ev2 *querypb.EventToken) int
Fresher compares two event tokens. It returns a negative number if ev1<ev2, zero if they're equal, and a positive number if ev1>ev2. In case of doubt (we don't have enough information to know for sure), it returns a negative number.
func Minimum ¶
func Minimum(ev1, ev2 *querypb.EventToken) *querypb.EventToken
Minimum returns an event token that is guaranteed to happen before both provided EventToken objects.
FIXME(alainjobart) for now, we always strip the shard and position, and only look at timestamp. It is only used across shards so it's not a big deal. When we compare values within a shard, we'll have to fix this.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.