synctime

package
v0.0.0-...-c0ae054 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(interpreter PodInterpreter) (InitialMarker, Notifier, Reader)

Types

type ClockPodInterpreter

type ClockPodInterpreter struct {
	Clock clock.Clock
}

Always takes the informer receive time as the pod update time.

func (*ClockPodInterpreter) Interpret

func (interp *ClockPodInterpreter) Interpret(*corev1.Pod) (time.Time, error)

type InitialMarker

type InitialMarker func()

type Notifier

type Notifier func(*corev1.Pod) error

type PodInterpreter

type PodInterpreter interface {
	Interpret(pod *corev1.Pod) (time.Time, error)
}

PodInterpreter determines the last timestamp a pod was updated from the object. Users may provide other implementations using side channels to determine this.

type Reader

type Reader func() optional.Optional[time.Time]

type StatusPodInterpreter

type StatusPodInterpreter struct{}

func (StatusPodInterpreter) Interpret

func (StatusPodInterpreter) Interpret(pod *corev1.Pod) (time.Time, error)

Jump to

Keyboard shortcuts

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