clock

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

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.

type RealClock deprecated

type RealClock = clocks.RealClock

Deprecated: Use k8s.io/utils/clock.RealClock instead.

type Ticker deprecated

type Ticker = clocks.Ticker

Ticker defines the Ticker interface.

Deprecated: Use k8s.io/utils/clock.Ticker instead.

type Timer deprecated

type Timer = clocks.Timer

Timer allows for injecting fake or real timers into code that needs to do arbitrary things based on time.

Deprecated: Use k8s.io/utils/clock.Timer instead.

Jump to

Keyboard shortcuts

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