blob: d575c5b2f4cc80c53ae9924c9ffa181fd549b3d5 [file] [log] [blame]
Lorenz Brun6adf8842021-10-05 13:39:11 +02001package main
2
3import (
4 "github.com/spf13/cobra"
5)
6
7// rootCmd represents the base command when called without any subcommands
8var rootCmd = &cobra.Command{
9 Use: "metroctl",
10 Short: "metroctl controls Metropolis nodes and clusters.",
11}
12
Mateusz Zalegad5f2f7a2022-07-05 18:48:56 +020013type metroctlFlags struct {
14 // clusterEndpoints is a list of the targeted cluster's endpoints, used by
15 // commands that perform RPC on it.
16 clusterEndpoints []string
17}
18
19var flags metroctlFlags
20
21func init() {
22 rootCmd.PersistentFlags().StringArrayVar(&flags.clusterEndpoints, "endpoints", nil, "A list of the target cluster's endpoints.")
23}
24
Lorenz Brun6adf8842021-10-05 13:39:11 +020025func main() {
26 cobra.CheckErr(rootCmd.Execute())
27}