times

package
v0.0.0-...-f6ab670 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockedClock

type MockedClock struct {
	mock.Mock
	AfterChannel chan time.Time
}

MockedClock implements the Now method to return a predictable time and the After method to return a channel that ca be woken up on demand.

func NewMockedClock

func NewMockedClock() *MockedClock

NewMockedClock creates a new instance of a mocked clock

func (*MockedClock) After

func (c *MockedClock) After(d time.Duration) <-chan time.Time

After returns a channel that receives when we tell it to.

func (*MockedClock) Now

func (c *MockedClock) Now() time.Time

Now returns a predefined value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL