key

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreatedBy                = "silence-operator"
	ValidUntilAnnotationName = "valid-until"
	DateOnlyLayout           = "2006-01-02"
)

Variables

This section is empty.

Functions

func IsInvalidExpirationDate added in v0.9.0

func IsInvalidExpirationDate(err error) bool

func IsWrongType

func IsWrongType(err error) bool

func SilenceComment

func SilenceComment(silence v1alpha1.Silence) string

func SilenceEndsAt added in v0.9.0

func SilenceEndsAt(silence v1alpha1.Silence) (time.Time, error)

SilenceEndsAt gets the expiry date for a given silence. The expiry date is retrieved from the annotation name configured by ValidUntilAnnotationName. The expected format is defined by DateOnlyLayout. It returns an invalidExpirationDateError in case the date format is invalid.

func ToSilence

func ToSilence(v interface{}) (v1alpha1.Silence, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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