util

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubePodName = "POD_NAME"

	KubeResourcePrefix = "stolon-cluster"

	KubeClusterLabel = "stolon-cluster"

	KubeClusterDataAnnotation = "stolon-clusterdata"
	KubeStatusAnnnotation     = "stolon-status"
)

Variables

This section is empty.

Functions

func CommonElements

func CommonElements(a []string, b []string) []string

CommonElements return the common elements in two slices of strings

func CompareStringSlice

func CompareStringSlice(a []string, b []string) bool

CompareStringSlice compares two slices of strings, a nil slice is considered an empty one

func CompareStringSliceNoOrder

func CompareStringSliceNoOrder(a []string, b []string) bool

CompareStringSliceNoOrder compares two slices of strings regardless of their order, a nil slice is considered an empty one

func Difference added in v0.12.0

func Difference(a []string, b []string) []string

Difference returns elements in a - b

func GetUser

func GetUser() (string, error)

func NewKubeClientConfig

func NewKubeClientConfig(kubeconfigPath, context, namespace string) clientcmd.ClientConfig

NewKubeClientConfig return a kube client config that will by default use an in cluster client config or, if not available or overridden, an external client config using the default client behavior used also by kubectl.

func PodName

func PodName() (string, error)

func StringInSlice

func StringInSlice(s []string, e string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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