utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

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

Contains is used to check whether a list contains string s

func GeneratePassword

func GeneratePassword(n int) (string, error)

GeneratePassword returns a base64 encoded securely random bytes.

func GetAnnotation

func GetAnnotation(annotations map[string]string, key string) string

GetAnnotation returns the annotation value for a given key, or an empty string if not set

func GetKafkaConfig

func GetKafkaConfig(ctx context.Context, kubeClient kubernetes.Interface,
	namespace string, name string,
) (string, string, string, string, error)

GetKafkaConfig retrieves kafka server, caCert, clientCert, clientKey from the secret

func Remove

func Remove(list []string, s string) []string

Remove is used to remove string from a string array

func RemoveDuplicates

func RemoveDuplicates(elements []string) []string

func UpdateObject added in v0.7.0

func UpdateObject(ctx context.Context, runtimeClient client.Client, obj client.Object) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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