INNER CODE UNIT · Go

newTailCmd

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

func newTailCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
	return &cobra.Command{
		Use:   "tail INSTANCE",
		Short: "Tail logs from all nodes (requires kubectl tail plugin)",
		Long:  "Tail logs from all nodes. Requires the 'tail' plugin. Install it with 'kubectl krew install tail'",
		Args:  cobra.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			executor := getExecutor()
			instance := args[0]
			return executor.Execute("tail", "--svc", instance)
		},
	}
}

func newObserveCmd(getExecutor func() *kubectlExecutor) *cobra.Command {
	return &cobra.Command{
		Use:   "observe INSTANCE NODE",
		Short: "Run 'rabbitmq-diagnostics observer' on a specific node",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…