cmd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadKubectl

func DownloadKubectl(version string) error

DownloadKubectl - download user specified version of kubectl

func Execute

func Execute(version string)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ProgressBarConfig added in v0.1.2

func ProgressBarConfig(bar *pb.ProgressBar, prefix string)

ProgressBarConfig .

func RemoveKubectlVersion

func RemoveKubectlVersion(version string) error

RemoveKubectlVersion - removes specific kubectl version from machine

func UseKubectlBinary

func UseKubectlBinary(version string) error

UseKubectlBinary - sets kubectl to the version specified

Types

type ProgressBar added in v0.1.2

type ProgressBar struct {
	// contains filtered or unexported fields
}

ProgressBar wraps a github.com/cheggaaa/pb.Pool in order to display download progress for one or multiple downloads.

If two different instance of ProgressBar try to display a progress only one will be displayed. It is therefore recommended to use DefaultProgressBar

func (*ProgressBar) TrackProgress added in v0.1.2

func (cpb *ProgressBar) TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) io.ReadCloser

TrackProgress instantiates a new progress bar that will display the progress of stream until closed. total can be 0.

Jump to

Keyboard shortcuts

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