util

package
v1.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDirectoryExist

func EnsureDirectoryExist(dirName string) error

EnsureDirectoryExist create directory if does not exist

func IsDirExist

func IsDirExist(path string) bool

IsDirExist return true if path exist and is a dir, other cases return false

func IsFileExist

func IsFileExist(file string) bool

IsFileExist return true if file exist and is a regular file, other cases return false

func NewCRCli

func NewCRCli(kubeconfig string) (versioned.Interface, error)

NewCRCli create a CR cli Interface

func NewEventRecorder

func NewEventRecorder(kubeCli kubernetes.Interface, source string) record.EventRecorder

NewEventRecorder return the specify source's recoder

func NewKubeAndCRCli

func NewKubeAndCRCli(kubeconfig string) (kubernetes.Interface, versioned.Interface, error)

NewKubeAndCRCli create both kube cli and CR cli

func NewKubeCli

func NewKubeCli(kubeconfig string) (kubernetes.Interface, error)

NewKubeCli create a kubeCli Interface

func NormalizeBucketURI

func NormalizeBucketURI(bucket string) string

NormalizeBucketURI normal bucket URL for rclone, e.g. s3://bucket -> s3:bucket

func OpenDB

func OpenDB(dsn string) (*sql.DB, error)

OpenDB opens db

func ValidCmdFlags

func ValidCmdFlags(cmdPath string, flagSet *pflag.FlagSet)

ValidCmdFlags verify that all flags are set

Types

This section is empty.

Jump to

Keyboard shortcuts

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