util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMergePatch

func CreateMergePatch(original, new interface{}) ([]byte, error)

CreateMergePatch return patch generated from original and new interfaces

func GetGangNameByPod

func GetGangNameByPod(pod *v1.Pod) string

func GetId

func GetId(namespace, name string) string

func IsPodNeedGang

func IsPodNeedGang(pod *v1.Pod) bool

func ParsePgTimeoutSeconds

func ParsePgTimeoutSeconds(timeoutSeconds int32) (time.Duration, error)

func StringToGangGroupSlice

func StringToGangGroupSlice(s string) ([]string, error)

StringToGangGroupSlice Parse gang group's annotation like :"["nsA/gangA","nsB/gangB"]" => goLang slice : []string{"nsA/gangA"."nsB/gangB"}

Types

This section is empty.

Jump to

Keyboard shortcuts

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