utils

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNamespace = "default"

DefaultNamespace is the default namespace of the Ververica Platform

View Source
const FinalizerName = "finalizers.fintechstudios.com"

FinalizerName is the name we use for finalizing K8s resources

Variables

This section is empty.

Functions

func AddFinalizer

func AddFinalizer(meta *metav1.ObjectMeta) bool

AddFinalizer adds the finalizer to a K8s resource's object metadata

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString checks if a string is contained in a slice.

func GetNamespaceOrDefault

func GetNamespaceOrDefault(namespace string) string

GetNamespaceOrDefault will return either the given namespace, if valid, or the default Ververica Platform namespace

func IgnoreNotFoundError

func IgnoreNotFoundError(err error) error

IgnoreNotFoundError returns nil for Swagger API 404 errors, otherwise the original error

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError returns if an error is a 404

func IsRequeueResponse

func IsRequeueResponse(res ctrl.Result, err error) bool

IsRequeueResponse determines whether or not a response will result in re-queueing the message

func MustParseTime added in v0.7.1

func MustParseTime(layout, str string) (t time.Time)

MustParseTime tries to parse a string into a time.Time and panics if there is an error

func RemoveFinalizer

func RemoveFinalizer(meta *metav1.ObjectMeta) bool

RemoveFinalizer removes the finalizer from a K8s object metadata

func RemoveString

func RemoveString(slice []string, s string) (result []string)

RemoveString removes a string from a slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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