Skip to content

Commit

Permalink
kafka(cli): add help message for topic create subcommand (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangKian authored Jan 11, 2024
1 parent d30e49f commit 76c4c8c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hstream-kafka/HStream/Kafka/Client/Cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -536,16 +536,19 @@ foreign import ccall interruptible "hs_consumer_consume"

creatableTopicParserV0 :: Parser K.CreatableTopicV0
creatableTopicParserV0 = K.CreatableTopicV0
<$> strArgument (metavar "TopicName")
<*> option auto (O.long "num-partitions" <> O.short 'p' <> O.value 1 <> O.showDefault <> metavar "Int32")
<*> option auto (O.long "replication-factor" <> O.short 'r' <> O.value 1 <> O.showDefault <> metavar "Int16")
<$> strArgument (metavar "TopicName" <> help "Topic name")
<*> option auto ( O.long "num-partitions" <> O.short 'p' <> O.value 1 <> O.showDefault <> metavar "Int32"
<> help "Number of partitions")
<*> option auto ( O.long "replication-factor" <> O.short 'r' <> O.value 1 <> O.showDefault <> metavar "Int16"
<> help "Topic replication factor")
<*> pure (K.KaArray $ Just V.empty)
<*> pure (K.KaArray $ Just V.empty)

createTopicsRequestParserV0 :: Parser K.CreateTopicsRequestV0
createTopicsRequestParserV0 = K.CreateTopicsRequestV0
<$> (K.KaArray . Just . V.singleton <$> creatableTopicParserV0)
<*> option auto (O.long "timeout" <> O.short 't' <> O.value 5000 <> O.showDefault <> metavar "Int32")
<*> option auto ( O.long "timeout" <> O.short 't' <> O.value 5000 <> O.showDefault <> metavar "Int32"
<> help "Request timeout in milliseconds")

-------------------------------------------------------------------------------

Expand Down

0 comments on commit 76c4c8c

Please sign in to comment.