Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CleanerLabel is the label this operator looks for on resources when // deciding whether to manage them. In other words, when this label is set // on an object it tells the cleanup-operator to watch that object and // dispose of it when it outlives its usefulness. CleanerLabel = project.Name() + ".giantswarm.io/enabled" // TTLLabel is the label that specifies how long a specific object should // live as a time.Duration. In other words the object with this label will // expire at `Status.CreateTime` + value of `TTLLabel`. TTLLabel = project.Name() + ".giantswarm.io/ttl" )
Functions ¶
func IsInvalidArgument ¶
IsInvalidArgument asserts invalidArgumentError which in turn means a function was given an invalid argument (like a nil interface).
func IsWrongTypeError ¶
IsWrongTypeError asserts wrongTypeError which in turn means a function was given a wrapped type it did not expect.
func TTL ¶
func TTL(obj LabelsGetter) time.Duration
TTL extracts the value of TTLLabel from an object, parses it and returns a time.Duration representing number of seconds an object is set to live. If this label is not specified on an object, it will default to an equivalent of 8 hours.
Types ¶
type LabelsGetter ¶
LabelsGetter is an object that allows access to its labels via GetLabels method.
Click to show internal directories.
Click to hide internal directories.