Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock is where code reads the current time. A component receives one when it is built: the wall clock from New in production, a Fixed clock in a test.
type Fixed ¶ added in v0.27.0
type Fixed struct {
// contains filtered or unexported fields
}
Fixed is a test clock that returns the instant it holds until Set or Advance moves it. It is safe for concurrent use, so a service under test can read it while the test moves it.
func (*Fixed) Advance ¶ added in v0.27.0
Advance moves the instant the clock holds by d; a negative d moves it back.
Click to show internal directories.
Click to hide internal directories.