fake

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 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 Clock added in v0.17.0

type Clock struct {
	*clock.FakeClock
	TP *ManualTickProvider
}

Clock is K8s clock.Clock but it overrides tick provider with ManualTickProvider above.

func (Clock) NewTicker added in v0.17.0

func (fc Clock) NewTicker(time.Duration) clock.Ticker

NewTicker returns a NewTicker which is a ManualTickProvider.

type ManualTickProvider added in v0.13.0

type ManualTickProvider struct {
	Channel chan time.Time
}

A ManualTickProvider holds a channel that delivers `ticks' of a clock at intervals.

func (*ManualTickProvider) C added in v0.17.0

func (mtp *ManualTickProvider) C() <-chan time.Time

C returns the tick channel.

func (*ManualTickProvider) NewTicker added in v0.13.0

func (mtp *ManualTickProvider) NewTicker(time.Duration) *time.Ticker

NewTicker returns a Ticker containing a channel that will send the time with a period specified by the duration argument.

func (*ManualTickProvider) Stop added in v0.17.0

func (mtp *ManualTickProvider) Stop()

Stop is nonce here.

Jump to

Keyboard shortcuts

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