From 76c4c8c4f84967b2f1a7eb472a72873461a266d7 Mon Sep 17 00:00:00 2001 From: YangKian <45479280+YangKian@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:10:15 +0800 Subject: [PATCH] kafka(cli): add help message for topic create subcommand (#1737) --- hstream-kafka/HStream/Kafka/Client/Cli.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hstream-kafka/HStream/Kafka/Client/Cli.hs b/hstream-kafka/HStream/Kafka/Client/Cli.hs index 1e1da764d..93f0bc94b 100644 --- a/hstream-kafka/HStream/Kafka/Client/Cli.hs +++ b/hstream-kafka/HStream/Kafka/Client/Cli.hs @@ -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") -------------------------------------------------------------------------------