util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelArryElement

func DelArryElement(slice []string, s string) (result []string)

func EnvOrDefault

func EnvOrDefault(envName, defaultValue string) string

func ExecPodOnce

func ExecPodOnce(opts ExecPodOnceOpts) (result []byte, err error)

ExecPodOnce exec a command in a pod

func InArray

func InArray(slice []string, s string) bool

Types

type ExecPodOnceOpts

type ExecPodOnceOpts struct {
	RestConfig    *rest.Config
	KubeClient    *kubernetes.Clientset
	Namespace     string
	PodName       string
	ContainerName string
	Command       []string
	Args          []string
	Timeout       time.Duration
}

ExecPodOnceOpts ExecPodOnce exec a command in a pod options

type Version

type Version struct {
	// Major 主版本,通常包含不可逆的变更
	Major int
	// Minor 次要版本,包含小范围功能改动
	Minor int
	// Bugfix 次要版本的bug修复版本
	Bugfix string
}

func ParseVersion

func ParseVersion(versionStr string) (version *Version, err error)

ParseVersion 解析版本号,支持 v0.0.0 和 0.0.0 这种方式

Jump to

Keyboard shortcuts

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