Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoHashPrefix = errors.New("must have '#' prefix") ErrInvalidTickType = errors.New("invalid tick type received") ErrInvalidUUIDFormat = errors.New("data has invalid UUID format") ErrInvalidIdentityFormat = errors.New("identity data has invalid format") ErrInvalidIDTimeFormat = errors.New("ID_Time data has invalid format") )
Errors ...
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock exposes a giving monotonic lamport clocking structure which returns custom continouse ticks for giving origin and id.
func Lamport ¶
Lamport returns a new instance of Clock using the LAMPORTTICK has the time tick type.
type UUID ¶
UUID generates a uuid which runs with a giving length of encoded values.
func (UUID) Equal ¶
Equal returns true/false if giving UUIDs are a match in tick type, origin and id. It does not compare tick value.
func (UUID) ExactEqual ¶
ExactEqual returns true/false if giving UUIDs a exact match.
func (UUID) GreaterThan ¶
GreaterThan validates that the uuid is less than value of provided uuid.
func (UUID) MarshalText ¶
MarshalText returns byte slice of giving uuid.
func (UUID) String ¶
String returns string version of uuid. Format: #TICK_TYPE#ID_LENGTH#OriginID_TIMETICK
func (*UUID) UnmarshalText ¶
UnmarshalText unmarshals giving uuid into appropriate UUID struct.