package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
DecimalToHLC performs the conversion from an inputted DECIMAL datum for an AS OF SYSTEM TIME query to an HLC timestamp.
IsUntrustworthyRemoteWallTimeError returns true if the error came resulted from a call to Clock.UpdateAndCheckMaxOffset due to the passed ClockTimestamp being too far in the future.
NewClock returns a Clock configured to use a specified time source.
NewClockForTesting creates a new Clock for tests that don't care about clock offsets, disabling offset checks.
NewClockWithSystemTimeSource creates a Clock that reads the system time.
NewHybridManualClock returns a new instance, initialized with specified timestamp.
NewPopulatedClockTimestamp is needed for the gogoproto.populate option.
ParseHLC parses a string representation of an `hlc.Timestamp`.
ParseTimestamp attempts to parse the string generated from Timestamp.String().
UnixNano returns the local machine's physical nanosecond unix epoch timestamp as a convenience to create a HLC via c := hlc.NewClockWithSystemTimeSource( ..
# Variables
MaxClockTimestamp is the max value allowed for ClockTimestamp.
MaxTimestamp is the max value allowed for Timestamp.
MinClockTimestamp is the min value allowed for ClockTimestamp.
MinTimestamp is the min value allowed for Timestamp.
# Structs
Clock is a hybrid logical clock.
HybridManualClock is a convenience type to facilitate creating a hybrid logical clock whose physical clock ticks with the wall clock, but that can be moved arbitrarily into the future or paused.
# Type aliases
ClockTimestamp is a Timestamp with the added capability of being able to update a peer's HLC clock.