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 RandString(n int) string
- func ShowMasterCommitTS(dsn string) (int64, error)
- 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 RandString ¶
RandString reference: http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang
func ShowMasterCommitTS ¶ added in v1.1.0
Show master commit ts of TiDB
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.