Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ListConsumerGroupsCmd = &cobra.Command{ Use: "list", Short: "Lists the consumer groups", Run: func(command *cobra.Command, args []string) { cobraUtil := base.NewCobraUtil(command) addr := strings.Split(cobraUtil.GetStringArg("broker-list"), ",") cgl := consumerGroupAdmin{ saramaClient: client.NewSaramaClient(addr), } err := cgl.ListGroups(cobraUtil.GetStringArg("topic")) if err != nil { logger.Fatalf("Error while listing consumer groups for %v topic", err) } }, }
View Source
var ListTopicCmd = &cobra.Command{ Use: "list", Short: "Lists the topics satisfying the passed criteria if any", Run: func(command *cobra.Command, args []string) { cobraUtil := base.NewCobraUtil(command) lastWrite := int64(cobraUtil.GetIntArg("last-write")) size := int64(cobraUtil.GetIntArg("size")) var baseCmd *base.Cmd if lastWrite == 0 { baseCmd = base.Init(cobraUtil) } else { baseCmd = base.Init(cobraUtil, base.WithSSH()) } l := listTopic{ Lister: baseCmd.GetTopic(), replicationFactor: cobraUtil.GetIntArg("replication-factor"), lastWrite: lastWrite, dataDir: cobraUtil.GetStringArg("data-dir"), size: size, } l.listTopic() }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.