package mockclock

Import Path
	go.pact.im/x/clock/mockclock (on go.dev)

Dependency Relation
	imports 4 packages, and imported by 0 packages

Involved Source Files clock.go Package mockclock provides clock.Clock implementation that uses GoMock mocking framework. gen.go mockclock.go ticker.go timer.go
Package-Level Type Names (total 7, all are exported)
/* sort exporteds by: | */
Clock is a union of all interfaces implemented by a full-featured clock implementation. It is satisfied by clock.Clock that provides shims for missing functionality. It is an input for mock types generator and must not be used outside of this package. Now returns the current local time. Schedule schedules an event that calls f in its own goroutine when the given duration elapses. It returns an Event that can be canceled using the Stop method. Ticker returns a new Ticker containing a channel that will send the time on the channel after each tick. The period of the ticks is specified by the duration argument. The ticker will adjust the time interval or drop ticks to make up for slow receivers. The duration d must be greater than zero; if not, Ticker will panic. Stop the ticker to release associated resources. Timer creates a new Timer that will send the current time on its channel after at least duration d. *MockClock Clock : go.pact.im/x/clock.NowScheduler Clock : go.pact.im/x/clock.Scheduler Clock : go.pact.im/x/clock.TickerScheduler Clock : go.pact.im/x/clock.TimerScheduler
MockClock is a mock of Clock interface. EXPECT returns an object that allows the caller to indicate expected use. Now mocks base method. Schedule mocks base method. Ticker mocks base method. Timer mocks base method. *MockClock : Clock *MockClock : go.pact.im/x/clock.NowScheduler *MockClock : go.pact.im/x/clock.Scheduler *MockClock : go.pact.im/x/clock.TickerScheduler *MockClock : go.pact.im/x/clock.TimerScheduler func NewMockClock(ctrl *gomock.Controller) *MockClock
MockClockMockRecorder is the mock recorder for MockClock. Now indicates an expected call of Now. Schedule indicates an expected call of Schedule. Ticker indicates an expected call of Ticker. Timer indicates an expected call of Timer. func (*MockClock).EXPECT() *MockClockMockRecorder
MockTicker is a mock of Ticker interface. C mocks base method. EXPECT returns an object that allows the caller to indicate expected use. Reset mocks base method. Stop mocks base method. *MockTicker : go.pact.im/x/clock.Ticker func NewMockTicker(ctrl *gomock.Controller) *MockTicker
MockTickerMockRecorder is the mock recorder for MockTicker. C indicates an expected call of C. Reset indicates an expected call of Reset. Stop indicates an expected call of Stop. func (*MockTicker).EXPECT() *MockTickerMockRecorder
MockTimer is a mock of Timer interface. C mocks base method. EXPECT returns an object that allows the caller to indicate expected use. Reset mocks base method. Stop mocks base method. *MockTimer : go.pact.im/x/clock.Timer func NewMockTimer(ctrl *gomock.Controller) *MockTimer
MockTimerMockRecorder is the mock recorder for MockTimer. C indicates an expected call of C. Reset indicates an expected call of Reset. Stop indicates an expected call of Stop. func (*MockTimer).EXPECT() *MockTimerMockRecorder
Package-Level Functions (total 3, all are exported)
NewMockClock creates a new mock instance.
NewMockTicker creates a new mock instance.
NewMockTimer creates a new mock instance.