utils

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 22 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

func WrapExecResult added in v0.9.0

func WrapExecResult(host net.IP, command string, output []byte, err 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