Documentation
¶
Overview ¶
Package clock is the canonical injected-dependency example (ADR-0002). It provides the Clock interface so components can be tested with a deterministic fake instead of wall-clock time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock is the port for time operations. Components depend on this interface; the app injects System() in production and a Fake in tests.
type Manual ¶ added in v0.2.5
type Manual struct {
// contains filtered or unexported fields
}
Manual is a fake clock that stands still until Advance moves it, for tests of time-bounded behavior. Safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.