diff --git a/cmd/zrok/gc.go b/cmd/zrok/admin_gc.go similarity index 71% rename from cmd/zrok/gc.go rename to cmd/zrok/admin_gc.go index 66899bc2..86a807ef 100644 --- a/cmd/zrok/gc.go +++ b/cmd/zrok/admin_gc.go @@ -8,25 +8,25 @@ import ( ) func init() { - rootCmd.AddCommand(newGcCmd().cmd) + adminCmd.AddCommand(newAdminGcCommand().cmd) } -type gcCmd struct { +type adminGcCommand struct { cmd *cobra.Command } -func newGcCmd() *gcCmd { +func newAdminGcCommand() *adminGcCommand { cmd := &cobra.Command{ Use: "gc ", Short: "Garbage collect a zrok instance", Args: cobra.ExactArgs(1), } - c := &gcCmd{cmd: cmd} + c := &adminGcCommand{cmd: cmd} cmd.Run = c.run return c } -func (gc *gcCmd) run(_ *cobra.Command, args []string) { +func (gc *adminGcCommand) run(_ *cobra.Command, args []string) { cfg, err := controller.LoadConfig(args[0]) if err != nil { panic(err) diff --git a/cmd/zrok/main.go b/cmd/zrok/main.go index 72396c27..35a155bc 100644 --- a/cmd/zrok/main.go +++ b/cmd/zrok/main.go @@ -16,7 +16,9 @@ func init() { rootCmd.PersistentFlags().BoolVarP(&panicInstead, "panic", "p", false, "Panic instead of showing pretty errors") zrokdir.AddZrokApiEndpointFlag(&apiEndpoint, rootCmd.PersistentFlags()) rootCmd.AddCommand(accessCmd) + rootCmd.AddCommand(adminCmd) rootCmd.AddCommand(shareCmd) + rootCmd.AddCommand(testCmd) } var rootCmd = &cobra.Command{ @@ -34,12 +36,22 @@ var apiEndpoint string var accessCmd = &cobra.Command{ Use: "access", - Short: "Access services", + Short: "Create frontend access for services", +} + +var adminCmd = &cobra.Command{ + Use: "admin", + Short: "Administration and operations functions", } var shareCmd = &cobra.Command{ Use: "share", - Short: "Share resources", + Short: "Create backend access for services", +} + +var testCmd = &cobra.Command{ + Use: "test", + Short: "Utilities for testing zrok deployments", } func main() { diff --git a/cmd/zrok/reserve.go b/cmd/zrok/reserve.go index 509bb090..4bd88844 100644 --- a/cmd/zrok/reserve.go +++ b/cmd/zrok/reserve.go @@ -26,7 +26,7 @@ type reserveCommand struct { func newReserveCommand() *reserveCommand { cmd := &cobra.Command{ Use: "reserve ", - Short: "Reserve a service", + Short: "Create a reserved service", Args: cobra.ExactArgs(2), } command := &reserveCommand{cmd: cmd} diff --git a/cmd/zrok/test.go b/cmd/zrok/test.go index 496d784f..ee272936 100644 --- a/cmd/zrok/test.go +++ b/cmd/zrok/test.go @@ -14,12 +14,6 @@ import ( func init() { testCmd.AddCommand(newTestEndpointCommand().cmd) - rootCmd.AddCommand(testCmd) -} - -var testCmd = &cobra.Command{ - Use: "test", - Short: "Utilities used for testing zrok", } type testEndpointCommand struct {