Documentation
¶
Index ¶
Constants ¶
View Source
const ( PodKey = "pod" NamespacesKey = "namespace" )
Variables ¶
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List intents discovered by the kafka mapper", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { ctxTimeout, cancel := context.WithTimeout(context.Background(), config.DefaultTimeout) defer cancel() podName := viper.GetString(PodKey) namespace := viper.GetString(NamespacesKey) m, err := kafkamapper.NewMapper() if err != nil { return err } intents, err := m.LoadIntents(ctxTimeout, podName, namespace) if err != nil { return err } if len(intents) == 0 { output.PrintStderr("No intents found.") } else { intentslister.ListFormattedIntents(intents) } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.