cmd

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultErrorExitCode defines exit the code for failed action generally
	DefaultErrorExitCode = 1
)

Variables

This section is empty.

Functions

func AddImagesCommonConfigFlags added in v1.11.0

func AddImagesCommonConfigFlags(cmd *cobra.Command, cfg *Configuration)

AddImagesCommonConfigFlags adds the flags that configure keadm

func CheckErr

func CheckErr(err error, handleErr func(string, int))

CheckErr formats a given error as a string and calls the passed handleErr func with that string and an exit code.

func GetKubeEdgeImages added in v1.11.0

func GetKubeEdgeImages(cfg *Configuration) []string

GetKubeEdgeImages returns a list of container images that related part expects to use

func NewCmdVersion

func NewCmdVersion() *cobra.Command

func NewKubeEdgeReset

func NewKubeEdgeReset() *cobra.Command

func NewKubeedgeCommand

func NewKubeedgeCommand() *cobra.Command

NewKubeedgeCommand returns cobra.Command to run keadm commands

func NewUpgradeCommand added in v1.16.0

func NewUpgradeCommand() *cobra.Command

NewUpgradeCommand creates a upgrade command instance and returns it.

func RunVersion

func RunVersion(cmd *cobra.Command) error

RunVersion provides the version information of keadm in format depending on arguments specified in cobra.Command.

func TearDownKubeEdge

func TearDownKubeEdge(isEdgeNode bool, kubeConfig string) error

TearDownKubeEdge will bring down either cloud or edge components, depending upon in which type of node it is executed

Types

type Configuration added in v1.11.0

type Configuration struct {
	// eg. v1.9.0
	KubeEdgeVersion string
	// eg. kubeedge
	ImageRepository string
	// eg. cloud/edge
	Part string

	RemoteRuntimeEndpoint string
}

Configuration represent keadm config options

func (*Configuration) GetImageRepository added in v1.11.0

func (cfg *Configuration) GetImageRepository() string

Directories

Path Synopsis
ctl
get

Jump to

Keyboard shortcuts

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