meltdown

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnnotationLastReconcile = fmt.Sprintf("%s/last-reconcile", apis.GroupName)

AnnotationLastReconcile is the key name of the timestamp for the last successful reconcile

Functions

func SetLastReconcile

func SetLastReconcile(objectMeta *metav1.ObjectMeta, now time.Time)

SetLastReconcile annotation in object meta to the given time

Types

type Window

type Window struct {
	Start    time.Time
	Duration time.Duration
}

Window represents a time window starting at start and ending at duration

func NewAnnotationWindow

func NewAnnotationWindow(duration time.Duration, annotations map[string]string) Window

NewAnnotationWindow returns a window starting at lastReconcile contained in annotations, ending after duration

func NewWindow

func NewWindow(duration time.Duration, lastReconcile *metav1.Time) Window

NewWindow returns a new time window starting at lastReconcile, ending after duration

func (Window) Contains

func (w Window) Contains(now time.Time) bool

Contains returns true if the given time is in the specified time window

Source Files

  • meltdown.go

Jump to

Keyboard shortcuts

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