Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = func() *cobra.Command { cmd := &cobra.Command{ Use: "clustermesh-dbg", Short: "CLI for interacting with ClusterMesh", PersistentPreRun: func(cmd *cobra.Command, args []string) { ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt) cmd.SetContext(ctx) }, } return cmd }()
View Source
var Troubleshoot = func() *cobra.Command { var etcdcfg string var timeout time.Duration cmd := &cobra.Command{ Use: "troubleshoot", Short: "Troubleshoot connectivity towards the local etcd kvstore", Run: func(cmd *cobra.Command, args []string) { stdout := cmd.OutOrStdout() fmt.Fprintf(stdout, "Local etcd kvstore:\n") cctx, cancel := context.WithTimeout(cmd.Context(), timeout) kvstore.EtcdDbg(cctx, etcdcfg, kvstore.DefaultEtcdDbgDialer{}, stdout) cancel() }, } RootCmd.AddCommand(cmd) flags := cmd.Flags() flags.StringVar(&etcdcfg, "etcd-config", "/var/lib/cilium/etcd-config.yaml", "Path to the etcd configuration") flags.DurationVar(&timeout, "timeout", 5*time.Second, "Timeout when checking connectivity to the etcd kvstore") return cmd }()
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.