Documentation
¶
Index ¶
- func ChangeFilesOwnership(iK8sClient interface{}, pods []string, ...) error
- func Contains(s []string, e string) bool
- func GetBoolEnvVar(name string, defVal bool) bool
- func GetFloat64EnvVar(name string, defVal float64) float64
- func GetFromAndToPathsFromK8s(iClient interface{}, pods []string, ...) ([]skbn.FromToPair, error)
- func GetFromAndToPathsK8sToDst(k8sClient interface{}, ...) ([]skbn.FromToPair, error)
- func GetFromAndToPathsSrcToK8s(srcClient, k8sClient interface{}, ...) ([]skbn.FromToPair, []string, []string, error)
- func GetIntEnvVar(name string, defVal int) int
- func GetPods(iClient interface{}, namespace, selector string) ([]string, error)
- func GetRandString() string
- func GetStringEnvVar(name, defVal string) string
- func GetTimeStamp() string
- func MapKeysToSlice(m map[string]string) []string
- func PathFromK8sToDst(k8sPath, cassandraDataDir, dstBasePath string) string
- func PathFromSrcToK8s(k8sClient interface{}, ...) (string, error)
- func SliceContainsSlice(outers, inners []string) error
- func SplitInTwo(s, sep string) (string, string)
- func TestK8sDirectory(iK8sClient interface{}, pods []string, ...) error
- type BoundedWaitGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeFilesOwnership ¶
func ChangeFilesOwnership(iK8sClient interface{}, pods []string, namespace, container, userGroup, cassandraDataDir string) error
ChangeFilesOwnership changes the ownership of files after restoring them
func Contains ¶
Contains checks if a slice contains a given value
func GetBoolEnvVar ¶
GetBoolEnvVar returns the default value if the variable is empty or not true or false, else the value
func GetFloat64EnvVar ¶
GetFloat64EnvVar returns the default value if the variable is empty, else the value
func GetFromAndToPathsFromK8s ¶
func GetFromAndToPathsFromK8s(iClient interface{}, pods []string, namespace, container, keyspace, tag, dstBasePath, cassandraDataDir string) ([]skbn.FromToPair, error)
GetFromAndToPathsFromK8s aggregates paths from all pods
func GetFromAndToPathsK8sToDst ¶
func GetFromAndToPathsK8sToDst(k8sClient interface{}, namespace, pod, container, keyspace, tag, dstBasePath, cassandraDataDir string) ([]skbn.FromToPair, error)
GetFromAndToPathsK8sToDst performs a path mapping between Kubernetes and a destination
func GetFromAndToPathsSrcToK8s ¶
func GetFromAndToPathsSrcToK8s(srcClient, k8sClient interface{}, srcPrefix, srcPath, srcBasePath, namespace, container, cassandraDataDir string) ([]skbn.FromToPair, []string, []string, error)
GetFromAndToPathsSrcToK8s performs a path mapping between a source and Kubernetes
func GetIntEnvVar ¶
GetIntEnvVar returns 0 if the variable is empty or not int, else the value
func GetPods ¶
GetPods returns a slice of strings of pod names by namespace and selector
func GetStringEnvVar ¶
GetStringEnvVar returns the default value if the variable is empty, else the value
func MapKeysToSlice ¶
MapKeysToSlice converts a map to a slice using the keys as the values
func PathFromK8sToDst ¶
PathFromK8sToDst maps a single path from Kubernetes to destination
func PathFromSrcToK8s ¶
func PathFromSrcToK8s(k8sClient interface{}, fromPath, cassandraDataDir, srcBasePath, namespace, container string, pods, tables, testedPaths map[string]string) (string, error)
PathFromSrcToK8s maps a single path from source to Kubernetes
func SliceContainsSlice ¶
SliceContainsSlice verifies that outer slice contains inner slice
func SplitInTwo ¶
SplitInTwo splits a string to two parts by a delimeter
Types ¶
type BoundedWaitGroup ¶
type BoundedWaitGroup struct {
// contains filtered or unexported fields
}
BoundedWaitGroup implements a sized WaitGroup
func NewBoundedWaitGroup ¶
func NewBoundedWaitGroup(cap int) BoundedWaitGroup
NewBoundedWaitGroup initializes a new BoundedWaitGroup
func (*BoundedWaitGroup) Add ¶
func (bwg *BoundedWaitGroup) Add(delta int)
Add performs a WaitGroup Add of a specified delta
func (*BoundedWaitGroup) Done ¶
func (bwg *BoundedWaitGroup) Done()
Done performs a WaitGroup Add of -1
Source Files
¶
- bwg.go
- env.go
- general.go
- kube.go
- path.go