bur

package
v1.0.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdBur = &cobra.Command{
	Use:     "burrow",
	Example: "  kafkactl burrow <groupName>",
	Short:   "Show Burrow Lag Evaluations <wip>",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		switch {
		case cmd.Flags().Changed("burrow"):
			burrow.LaunchBurrowClient(cfg.AdhocContext(cxFlags), burFlags)
		default:
			burrow.LaunchBurrowClient(cfg.GetContext(burFlags.Context), burFlags)
		}
	},
	Run: func(cmd *cobra.Command, args []string) {
		var burrowParts []jbbur.Partition
		switch {
		default:
			burrowParts = burrow.SearchBurrowConsumers(burFlags, args...)
		}
		switch {
		case cmd.Flags().Changed("out"):
			outFmt, err := cmd.Flags().GetString("out")
			if err != nil {
				out.Warnf("WARN: %v", err)
			}
			out.IfErrf(out.Marshal(burrowParts, outFmt))
		default:
			if burFlags.ShowID {
				printBur(burrowParts, "id")
				return
			}
			printBur(burrowParts)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL