-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
42 lines (37 loc) · 1.06 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
Repo Maintainer:
Adarsh Saxena
*/
package main
import (
"kxtop/app/cmd/nodes"
"kxtop/app/cmd/pods"
"os"
"github.com/spf13/cobra"
)
func main() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "kxtop",
Short: "An advanced kubectl top alternative for Kubernetes cluster.",
Long: `Kxtop is an advanced kubectl top alternative for Kubernetes cluster.
It provides the resource usage of pods, nodes, and PVCs in the cluster.
It also provides the analytics of the resource usage in the cluster.`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
}
func init() {
rootCmd.AddCommand(pods.PodsCmd)
rootCmd.AddCommand(nodes.NodesCmd)
// WIP for PVC & Analytics command
// rootCmd.AddCommand(pvc.PvcCmd)
// rootCmd.AddCommand(analytics.AnalyticsCmd)
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}