Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface { Now() time.Time Since(time.Time) time.Duration Sleep(time.Duration) WithTimeout(context.Context, time.Duration) (context.Context, context.CancelFunc) }
Clock defines how Fx accesses time. The interface is pretty minimal but it matches github.com/benbjohnson/clock. We intentionally don't use that interface directly; this keeps it a test dependency for us.
var System Clock = systemClock{}
System is the default implementation of Clock based on real time.
Click to show internal directories.
Click to hide internal directories.