Esempio n. 1
0
func (cmd *TopicHandler) runProducerTest(c *kingpin.ParseContext) error {
	query := url.Values{}
	query.Set("operation", "producer-test")
	query.Set("messages", strconv.FormatInt(int64(cmd.produceMessageCount), 10))
	cli.PrintJSON(cli.HTTPPutQuery(fmt.Sprintf("v1/topics/%s", cmd.topic), query.Encode()))
	return nil
}
Esempio n. 2
0
func (cmd *BrokerHandler) runReplace(c *kingpin.ParseContext) error {
	query := url.Values{}
	query.Set("replace", "true")
	cli.PrintJSON(cli.HTTPPutQuery(fmt.Sprintf("v1/brokers/%s", cmd.broker), query.Encode()))
	return nil
}
Esempio n. 3
0
func (cmd *NodeHandler) runRestart(c *kingpin.ParseContext) error {
	query := url.Values{}
	query.Set("node", fmt.Sprintf("node-%d", cmd.nodeId.val))
	cli.PrintJSON(cli.HTTPPutQuery("v1/nodes/restart", query.Encode()))
	return nil
}