Documentation
¶
Overview ¶
Package testclock is a settable clock for tests that would otherwise sleep through a TTL, grace window or rate-limit window.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock reports either a frozen instant (New) or the wall clock (Wall), in both cases shifted by every Advance so far. Frozen suits pure in-memory TTL pins; Wall suits integration tests whose other timestamps come from Postgres.
Click to show internal directories.
Click to hide internal directories.