INNER CODE UNIT · Go

newListCmd

rabbitmq/cluster-operator · kubectl-rabbitmq/commands.go:32

func newListCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
	return &cobra.Command{
		Use:   "list",
		Short: "List all RabbitMQ clusters",
		Args:  cobra.NoArgs,
		RunE: func(cmd *cobra.Command, args []string) error {
			executor := getExecutor()
			return executor.Execute("get", "rabbitmqclusters", "--sort-by={.metadata.name}")
		},
	}
}

func newCreateCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
	var opts clusterOptions

	cmd := &cobra.Command{
		Use:   "create INSTANCE",
		Short: "Create a RabbitMQ cluster",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…