util

package
v1.23.5 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareChannelVersion added in v1.18.0

func CompareChannelVersion(v1, v2 string) (v1IsLarger bool, err error)

func Contains added in v1.17.4

func Contains(list []string, s string) bool

func GetInstallScope added in v1.4.1

func GetInstallScope() string

GetInstallScope returns the scope of the installation

func GetIsolatedMode added in v1.6.0

func GetIsolatedMode() bool

func GetOperatorNamespace added in v1.4.1

func GetOperatorNamespace() string

GetOperatorNamespace returns the Namespace of the operator

func GetWatchNamespace added in v1.4.1

func GetWatchNamespace() string

GetWatchNamespace returns the Namespace of the operator

func GetoperatorCheckerMode added in v1.14.0

func GetoperatorCheckerMode() bool

func MergeCR

func MergeCR(defaultCR, changedCR []byte) map[string]interface{}

MergeCR deep merge two custom resource spec

func ResourceExists added in v1.4.1

func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)

ResourceExists returns true if the given resource kind exists in the given api groupversion

func ResourceNamespaced added in v1.13.0

func ResourceNamespaced(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)

ResourceNamespaced returns true if the given resource is namespaced

func StringSliceContentEqual added in v1.4.1

func StringSliceContentEqual(a, b []string) bool

StringSliceContentEqual checks if the contant from two string slice are the same

func WaitTimeout added in v1.6.0

func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool

WaitTimeout waits for the waitgroup for the specified max timeout. Returns true if waiting timed out.

Types

type MultiErr

type MultiErr struct {
	Errors []string
}

MultiErr is a multiple error slice

func (*MultiErr) Add

func (mer *MultiErr) Add(err error)

Add appends error message

func (*MultiErr) Error

func (mer *MultiErr) Error() string

Error is the error message

Jump to

Keyboard shortcuts

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