Documentation
¶
Overview ¶
Package clock provides the injectable clock (go-conventions.md "Time").
Everything that checks validity, schedules renewals or writes audit entries takes a Clock instead of calling time.Now, so tests control time exactly – certificate tests must never depend on the wall clock. Times are UTC.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fake ¶
type Fake struct {
// contains filtered or unexported fields
}
Fake is a manually controlled clock for tests. It is safe for concurrent use; time only moves when Set or Advance is called.
func (*Fake) Set ¶
Set moves the clock to t (converted to UTC); it may go backwards, which lets tests simulate a wrong system clock.
Click to show internal directories.
Click to hide internal directories.