util

package
v1.5.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConfig

func BuildConfig(master, kubeconfig string) (*rest.Config, error)

BuildConfig builds the configure file for command lines.

func CreateJobCommand

func CreateJobCommand(config *rest.Config, ns, name string, action vcbus.Action) error

CreateJobCommand executes a command such as resume/suspend.

func CreateQueueCommand added in v1.0.0

func CreateQueueCommand(vcClient *versioned.Clientset, ns, name string, action vcbus.Action) error

CreateQueueCommand executes a command such as open/close

func HomeDir

func HomeDir() string

HomeDir gets the env $HOME.

func HumanDuration

func HumanDuration(d time.Duration) string

HumanDuration translate time.Duration to human readable time string.

func InitFlags

func InitFlags(cmd *cobra.Command, cf *CommonFlags)

InitFlags initializes the common flags for most command lines.

func PopulateResourceListV1

func PopulateResourceListV1(spec string) (v1.ResourceList, error)

PopulateResourceListV1 takes strings of form <resourceName1>=<value1>,<resourceName1>=<value2> and returns ResourceList.

func TranslateTimestampSince

func TranslateTimestampSince(timestamp metav1.Time) string

TranslateTimestampSince translates the time stamp.

Types

type CommonFlags

type CommonFlags struct {
	Master     string
	Kubeconfig string
}

CommonFlags are the flags that most command lines have.

Jump to

Keyboard shortcuts

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