Documentation ¶
Index ¶
- func NewFakeClock(t time.Time) *testclocks.FakeClockdeprecated
- func NewFakePassiveClock(t time.Time) *testclocks.FakePassiveClockdeprecated
- type Clockdeprecated
- type FakeClockdeprecated
- type FakePassiveClockdeprecated
- type IntervalClockdeprecated
- type PassiveClockdeprecated
- type RealClockdeprecated
- type Tickerdeprecated
- type Timerdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeClock
deprecated
func NewFakeClock(t time.Time) *testclocks.FakeClock
NewFakeClock returns a new FakeClock.
Deprecated: Use k8s.io/utils/clock/testing.NewFakeClock instead.
func NewFakePassiveClock
deprecated
added in
v0.16.4
func NewFakePassiveClock(t time.Time) *testclocks.FakePassiveClock
NewFakePassiveClock returns a new FakePassiveClock.
Deprecated: Use k8s.io/utils/clock/testing.NewFakePassiveClock instead.
Types ¶
type Clock
deprecated
type Clock = clocks.WithTickerAndDelayedExecution
Clock allows for injecting fake or real clocks into code that needs to do arbitrary things based on time.
Deprecated: Use k8s.io/utils/clock.WithTickerAndDelayedExecution instead.
type FakeClock
deprecated
type FakeClock = testclocks.FakeClock
FakeClock implements Clock, but returns an arbitrary time.
Deprecated: Use k8s.io/utils/clock/testing.FakeClock instead.
type FakePassiveClock
deprecated
added in
v0.16.4
type FakePassiveClock = testclocks.FakePassiveClock
FakePassiveClock implements PassiveClock, but returns an arbitrary time.
Deprecated: Use k8s.io/utils/clock/testing.FakePassiveClock instead.
type IntervalClock
deprecated
type IntervalClock = testclocks.IntervalClock
IntervalClock implements Clock, but each invocation of Now steps the clock forward the specified duration.
WARNING: most of the Clock methods just `panic`; only PassiveClock is honestly implemented. The alternative, SimpleIntervalClock, has only the PassiveClock methods.
Deprecated: Use k8s.io/utils/clock/testing.SimpleIntervalClock instead.
type PassiveClock
deprecated
added in
v0.16.4
type PassiveClock = clocks.PassiveClock
PassiveClock allows for injecting fake or real clocks into code that needs to read the current time but does not support scheduling activity in the future.
Deprecated: Use k8s.io/utils/clock.PassiveClock instead.