utils

package
v0.0.0-...-046c8c4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

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

Contains checks if a slice contains a given value

func GetFromAndToPathsFromK8s

func GetFromAndToPathsFromK8s(iClient interface{}, pods []string, namespace, container, path, dstBasePath string) ([]skbn.FromToPair, error)

GetFromAndToPathsFromK8s aggregates paths from all pods

func GetFromAndToPathsK8sToDst

func GetFromAndToPathsK8sToDst(k8sClient interface{}, namespace, pod, container, path, dstBasePath string) ([]skbn.FromToPair, error)

GetFromAndToPathsK8sToDst performs a path mapping between Kubernetes and a destination

func GetRandString

func GetRandString() string

GetRandString returns a randon string

func GetReadyPods

func GetReadyPods(iClient interface{}, namespace, selector string) ([]string, error)

GetReadyPods gets a list of all ready ports according to defined namespace and selector

func GetTimeStamp

func GetTimeStamp() string

GetTimeStamp returns time stamp

func MapKeysToSlice

func MapKeysToSlice(m map[string]string) []string

MapKeysToSlice converts a map to a slice using the keys as the values

func SliceContainsSlice

func SliceContainsSlice(outers, inners []string) error

SliceContainsSlice verifies that outer slice contains inner slice

func SplitInTwo

func SplitInTwo(s, sep string) (string, string)

SplitInTwo splits a string to two parts by a delimeter

Types

This section is empty.

Jump to

Keyboard shortcuts

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