Documentation ¶
Overview ¶
Package truetimeish emulates a TrueTime service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request is a deferred request for a causal timestamp.
func Get ¶
func Get() Request
Get returns a deferred request for a causal timestamp.
Deferring the request permits clients to perform concurrent work during the commit-wait period. Clients call Timestamp on the TimestampRequest when the actual timestamp value is required.
For performance, clients should call Request as early in the interval within which the timestamp is required (e.g. as soon as all locks are acquired), and clients should call Timestamp on the returned request as late as possible before the timestamp value is required. Doing so reduces the sleep required to ensure timestamp causality.