Skip to content

doc: Add documentation on Producer and remaining modules #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2020

Conversation

sir4ur0n
Copy link

Hey, it's been a long time since my previous "documentation" big PR 😄

I finally found the time and motivation today to work on the second part of documentation.

AFAIU (according to Haddock report) the remaining parts that are not documented are:

  • Deprecated functions 9but each has a clear message explaining what to use instead)
  • Intentionally partially hidden functions/types, always related to C bindings
  • The Kafka.Metadata module, for which I have neither the time (right now), the motivation (😁) nor the knowledge to document

That aside, there is 100% documentation.

I seized the opportunity to cleanup/improve some existing documentation here and there, I will add some ad hoc (ahah) comments in the PR to pinpoint those.

Cheers!

@@ -159,7 +157,7 @@ pollMessage c@(KafkaConsumer _ (KafkaConf _ qr _)) (Timeout ms) = liftIO $ do
-- Unlike 'pollMessage' this function does not return usual "timeout" errors.
-- An empty batch is returned when there are no messages available.
--
-- This API is not available when 'userPolls' is set.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU this was a fragment of the past coming from #108

@sir4ur0n sir4ur0n force-pushed the doc/kafkaProducer branch from 2aecb3f to 73d3873 Compare July 19, 2020 21:51
data CallbackPollMode = CallbackPollModeSync | CallbackPollModeAsync deriving (Show, Eq)

-- | Properties to create 'KafkaConsumer'.
-- | Whether the callback polling should be done synchronously or not.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I documented this type to the best of my knowledge, feel free to correct

| DeliveryFailure ProducerRecord KafkaError
-- | An error occurred, but /librdkafka/ did not attach any sent message
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure in which scenario this can occur?

@AlexeyRaga AlexeyRaga merged commit a79d6a3 into haskell-works:master Jul 26, 2020
@AlexeyRaga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants