utils

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationExceeded

func DurationExceeded(duration time.Duration) bool

DurationExceeded check if duration is now meaning zero

func DurationSecondsPtr

func DurationSecondsPtr(d time.Duration) *int64

func IsTTLExpired

func IsTTLExpired(ttl time.Duration, creationTime time.Time, clock ext.Clock) (bool, time.Duration)

IsTTLExpired check whether current time has exceeded creation time + ttl duration

func MapKinds

func MapKinds(kinds []string) []string

MapKinds map resource data

func NextCronDuration

func NextCronDuration(cronString string, creationTime time.Time, clock ext.Clock) (time.Duration, error)

NextCronDuration check if next cron activation time has exceeded if so return true if activation time has not reached return false and remaining time in case it failed to parse cron expression return error

func ReadCompressData

func ReadCompressData(encodedReader io.ReadCloser) (io.ReadCloser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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