app

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnceCmd = &cobra.Command{
	Use:   "once",
	Short: "Perform one-time diagnostics of remote cluster or local cluster",
	Long:  "Perform one-time diagnostics of remote cluster or local cluster",
	RunE: func(cmd *cobra.Command, args []string) error {
		return DoOnceProbe(clusterName, probes)
	},
}
View Source
var OnceStatusCmd = &cobra.Command{
	Use:   "oncestatus",
	Short: "Print One-time probe status of remote cluster or local cluster",
	Long:  "Print One-probe status of remote cluster or local cluster",
	RunE: func(cmd *cobra.Command, args []string) error {
		if isList {
			return GetHistoryOnceProbeStatus(clusterName)
		} else {
			return GetOnceProbeStatus(clusterName, onceID)
		}
	},
}
View Source
var StatusCmd = &cobra.Command{
	Use:   "status",
	Short: "Print probe status of remote cluster or local cluster",
	Long:  "Print probe status of remote cluster or local cluster",
	RunE: func(cmd *cobra.Command, args []string) error {
		return GetProbeStatus(clusterName, status)
	},
}
View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print the version number of Kubeprober",
	Long:  "Print the version number of Kubeprober",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Kubeprober CLI Version: v0.0.3 -- HEAD")
	},
}

Functions

func DoOnceProbe

func DoOnceProbe(clusterName string, probes string) error

func GenerateProbeClient

func GenerateProbeClient(cluster *kubeproberv1.Cluster) (client.Client, error)

Generate k8sclient of cluster

func GetHistoryOnceProbeStatus

func GetHistoryOnceProbeStatus(clusterName string) error

func GetOnceProbeStatus

func GetOnceProbeStatus(clusterName string, id string) error

func GetProbeStatus

func GetProbeStatus(clusterName string, status string) error

func IsContain

func IsContain(items []string, item string) bool

func NewCmdProbeStatusManager

func NewCmdProbeStatusManager(stopCh <-chan struct{}) *cobra.Command

NewCmdProbeStatusManager creates a *cobra.Command object with default parameters

func PrintOnceProbeStatus

func PrintOnceProbeStatus(c client.Client, ns string, onceID string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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