Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultMinInterval = 4 * time.Second DefaultMaxInterval = 1024 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher[T equaler[T]] struct {
// contains filtered or unexported fields
}
type MockTickProvider ¶
type MockTickProvider struct {
// contains filtered or unexported fields
}
MockTickProvider is a mock implementation of the TickProvider interface
func NewMockTickProvider ¶
func NewMockTickProvider() *MockTickProvider
NewMockTickProvider creates a new MockTickProvider
func (*MockTickProvider) C ¶
func (m *MockTickProvider) C() <-chan time.Time
C returns the channel on which ticks are delivered
func (*MockTickProvider) GetCurrentDuration ¶
func (m *MockTickProvider) GetCurrentDuration() time.Duration
func (*MockTickProvider) Reset ¶
func (m *MockTickProvider) Reset(d time.Duration)
func (*MockTickProvider) Tick ¶
func (m *MockTickProvider) Tick()
Tick manually sends a tick to the channel
type TickProvider ¶
TickProvider defines an interface for a type that provides a channel that ticks at a regular interval
type TimedTickProvider ¶
type TimedTickProvider struct {
// contains filtered or unexported fields
}
TimedTickProvider wraps a time.Ticker to implement TickProvider
func NewTimedTickProvider ¶
func NewTimedTickProvider(d time.Duration) *TimedTickProvider
NewTimedTickProvider creates a new TimedTickProvider
func (*TimedTickProvider) C ¶
func (tw *TimedTickProvider) C() <-chan time.Time
C returns the ticker's channel
func (*TimedTickProvider) Reset ¶
func (tw *TimedTickProvider) Reset(d time.Duration)
Reset resets the ticker with a new duration
Click to show internal directories.
Click to hide internal directories.