mirror of
https://github.com/hanzo-ml/kuberay.git
synced 2026-10-30 19:48:47 +00:00
28 lines
662 B
Go
28 lines
662 B
Go
package cluster
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/spf13/cobra"
|
|
"k8s.io/cli-runtime/pkg/genericclioptions"
|
|
)
|
|
|
|
func NewClusterCommand(streams genericclioptions.IOStreams) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "cluster",
|
|
Short: "Manage ray cluster resources",
|
|
Long: `Allow users to manage and retrieve ray cluster information and resources.`,
|
|
SilenceUsage: true,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
if len(args) > 0 {
|
|
fmt.Println(fmt.Errorf("unknown command(s) %q", strings.Join(args, " ")))
|
|
}
|
|
cmd.HelpFunc()(cmd, args)
|
|
},
|
|
}
|
|
|
|
cmd.AddCommand(NewClusterGetCommand(streams))
|
|
return cmd
|
|
}
|