Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventTimeSource ¶
type EventTimeSource struct {
// contains filtered or unexported fields
}
EventTimeSource serves fake controlled time
func NewEventTimeSource ¶
func NewEventTimeSource() *EventTimeSource
NewEventTimeSource returns a time source that servers fake controlled time
func (*EventTimeSource) Now ¶
func (ts *EventTimeSource) Now() time.Time
Now return the fake current time
func (*EventTimeSource) Update ¶
func (ts *EventTimeSource) Update(now time.Time) *EventTimeSource
Update update the fake current time
type RealTimeSource ¶
type RealTimeSource struct{}
RealTimeSource serves real wall-clock time
func NewRealTimeSource ¶
func NewRealTimeSource() *RealTimeSource
NewRealTimeSource returns a time source that servers real wall clock time
func (*RealTimeSource) Now ¶
func (ts *RealTimeSource) Now() time.Time
Now return the real current time
type TimeSource ¶
TimeSource is an interface for any entity that provides the current time. Its primarily used to mock out timesources in unit test
Click to show internal directories.
Click to hide internal directories.