utils

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmOperation

func ConfirmOperation(promptInfo string) (bool, error)

ConfirmOperation confirm whether to continue with the operation, typing yes will return true.

func ConvertV1ClusterToV2Cluster

func ConvertV1ClusterToV2Cluster(v1Cluster *v1.Cluster) *v2.Cluster

func DecodeCRDFromByte

func DecodeCRDFromByte(data []byte, kind string) (interface{}, error)

DecodeCRDFromByte decode custom resource definition from byte slice, if not found, return io.EOF error.

func DecodeCRDFromFile

func DecodeCRDFromFile(filepath string, kind string) (interface{}, error)

DecodeCRDFromFile decode custom resource definition from file, if not found, return io.EOF error.

func DecodeCRDFromString

func DecodeCRDFromString(data string, kind string) (interface{}, error)

DecodeCRDFromString decode custom resource definition from string, if not found, return io.EOF error.

func DecodeV1ClusterFromFile

func DecodeV1ClusterFromFile(filepath string) (*v1.Cluster, error)

func NewK8sYamlDecoder

func NewK8sYamlDecoder(reader io.Reader) *yaml.YAMLToJSONDecoder

func Retry

func Retry(tryTimes int, trySleepTime time.Duration, action func() error) error

Types

This section is empty.

Directories

Path Synopsis
os
fs

Jump to

Keyboard shortcuts

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