utils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MediumCheckInterval  = 1000    // 1s
	LongCheckInterval    = 5000    // 5s
	ShortTimeoutSec      = 3 * 60  // 3 mins
	MediumTimeoutSec     = 6 * 60  // 6 mins
	LongTimeoutSec       = 15 * 60 // 15 mins
	ReallyLongTimeoutSec = 30 * 60 // 30 mins
)

Variables

View Source
var (
	BellSkipper = &bellSkipper{}
)

Functions

func DeployResourcesBox

func DeployResourcesBox() *rice.Box

func ExplicitConfirmationPrompt

func ExplicitConfirmationPrompt(label interface{}, confirmTexts ...string) error

func ExtractBoxFiles

func ExtractBoxFiles(box *rice.Box, target string, items ...string) error

func FixPromptBell

func FixPromptBell(prompt *promptui.Prompt)

func FormatPlainTable

func FormatPlainTable(table *tablewriter.Table)

func FormatStandardTable

func FormatStandardTable(table *tablewriter.Table)

func LoadKubeObject

func LoadKubeObject(decoder runtime.Decoder, objType runtime.Object, target string) (obj runtime.Object, err error)

func NewPromptSelect

func NewPromptSelect(label interface{}, items interface{}) promptui.Select

func PrintDescStruct

func PrintDescStruct(val interface{})

func PrintImportant

func PrintImportant(message string, header string)

func PrintJSON

func PrintJSON(val interface{})

func Retry

func Retry(retryFunc func() error, numTimes int, backoff int) error

func SaveKubeObject

func SaveKubeObject(encoder runtime.Encoder, obj runtime.Object, target string) error

func SearchFuncFor

func SearchFuncFor(slice []string, requirePrefix bool) func(string, int) bool

func TFResourceBox

func TFResourceBox() *rice.Box

func ValidateInt

func ValidateInt(val string) error

func ValidateIntWithLimits

func ValidateIntWithLimits(min, max int) func(val string) error

func ValidateKubeName

func ValidateKubeName(val string) error

func ValidateMinLength

func ValidateMinLength(length int) func(val string) error

func WaitUntilComplete

func WaitUntilComplete(timeoutSec int, checkInterval int, checkFunc func() (bool, error)) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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