Documentation
¶
Index ¶
- Variables
- func CurrentTimeInMS() int64
- type HLC
- type Timestamp
- func (t *Timestamp) Compare(t2 *Timestamp) int
- func (t Timestamp) GetLogicalTime() int16
- func (t Timestamp) GetPhysicalTime() int64
- func (t Timestamp) GoTime() time.Time
- func (t *Timestamp) IncrementLogical()
- func (t *Timestamp) ResetLogical()
- func (t *Timestamp) SetLogicalTime(lc int16)
- func (t *Timestamp) SetPhysicalTime(pt int64)
- func (t Timestamp) String() string
- func (t Timestamp) ToBytes() []byte
- func (t Timestamp) ToInt64() int64
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MaxTimestamp is the max value allowed for Timestamp. MaxTimestamp = Timestamp{PhysicalTime: math.MaxInt64, LogicalTime: math.MaxInt16} // MinTimestamp is the min value allowed for Timestamp. MinTimestamp = Timestamp{PhysicalTime: 0, LogicalTime: 0} )
Timestamp constant values.
Functions ¶
func CurrentTimeInMS ¶
func CurrentTimeInMS() int64
Types ¶
type Timestamp ¶
func NewTimestamp ¶
func NewTimestampBytes ¶
func NewTimestampI64 ¶
Creates HLC from I64 representation of HLC time
func NewTimestampPt ¶
func (Timestamp) GetLogicalTime ¶
func (Timestamp) GetPhysicalTime ¶
func (*Timestamp) IncrementLogical ¶
func (t *Timestamp) IncrementLogical()
func (*Timestamp) ResetLogical ¶
func (t *Timestamp) ResetLogical()
func (*Timestamp) SetLogicalTime ¶
func (*Timestamp) SetPhysicalTime ¶
Click to show internal directories.
Click to hide internal directories.