Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureDirectoryExist(dirName string) error
- func FindInPath(binary string, paths []string) (string, error)
- func GenURL(url string) string
- func GetContainerStatusFromPod(pod *corev1.Pod, cond func(corev1.ContainerStatus) bool) *corev1.ContainerStatus
- func GetHostname(hostnameOverride string) (string, error)
- func ListK8sNodes(kubectlPath, labels string) ([]string, error)
- func OpenDB(dsn string, maxIdleConns int) (*sql.DB, error)
- func ParseTemplate(strtmpl string, obj interface{}) ([]byte, error)
- func RandString(n int) string
- func Sleep(ctx context.Context, sleepTime time.Duration)
Constants ¶
View Source
const (
// LabelNodeRoleMaster specifies that a node is a master
LabelNodeRoleMaster = "node-role.kubernetes.io/master"
)
Variables ¶
View Source
var ExecutableFileExtensions = []string{""}
Valid file extensions for plugin executables.
Functions ¶
func EnsureDirectoryExist ¶
EnsureDirectoryExist create directory if does not exist
func FindInPath ¶
FindInPath returns the full path of the binary by searching in the provided path
func GetContainerStatusFromPod ¶
func GetContainerStatusFromPod(pod *corev1.Pod, cond func(corev1.ContainerStatus) bool) *corev1.ContainerStatus
func GetHostname ¶
GetHostname returns OS's hostname if 'hostnameOverride' is empty; otherwise, return 'hostnameOverride'.
func ListK8sNodes ¶
ListK8sNodes returns k8s nodes base on node labels
func ParseTemplate ¶
ParseTemplate validates and parses passed as argument template
func RandString ¶
RandString reference: http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.