cmd

package
v0.0.0-...-3b4f115 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Id     string
	GetCmd = &cobra.Command{
		Use:   "get",
		Short: "used to get details about resources",
	}
	GetAgentsCmd = &cobra.Command{
		Use:   "agents",
		Short: "get agents",
		Run: func(cmd *cobra.Command, args []string) {
			err := GetAgentsExecute()
			if err != nil {
				fmt.Println(err)
				os.Exit(1)
			}
		},
	}
	GetTestsCmd = &cobra.Command{
		Use:   "tests",
		Short: "get tests",
		Run: func(cmd *cobra.Command, args []string) {
			err := GetTestsExecute()
			if err != nil {
				fmt.Println(err)
				os.Exit(1)
			}
		},
	}
)
View Source
var (
	VERSION    string
	ClientOpts = thousandeyes.ClientOptions{
		AuthToken: os.Getenv("TE_TOKEN"),
		AccountID: os.Getenv("TE_AID"),
	}
	RootCmd = &cobra.Command{
		Use:   "tectl",
		Short: "tectl is a cli tool for managing thousandeyes",
		Long:  "tectl is a cli tool for managing thousandeyes and querying the existing configuration",
		Run: func(cmd *cobra.Command, args []string) {
			fmt.Printf("tectl version: %s", VERSION)
		},
	}
)
View Source
var TestsCmd = &cobra.Command{
	Use:   "tests",
	Short: "allows for viewing test details",
	Long:  `This sub-command displays test details`,
	Run: func(cmd *cobra.Command, args []string) {
		err := GetTestsExecute()
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}

Functions

func Execute

func Execute(version string) error

func GetAgentsExecute

func GetAgentsExecute() error

func GetTestsExecute

func GetTestsExecute() error

func TableOuput

func TableOuput() *tablewriter.Table

Types

This section is empty.

Jump to

Keyboard shortcuts

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