Skip to content

Missing APIs #139

@sir4ur0n

Description

@sir4ur0n

Hello,

While working on a PR (I will open soon) to add documentation on many types and functions of hw-kafka-client, I have noticed several times some weird things while reading this library API on Hackage: some types / type classes are used in the public API but not exposed.

E.g. HasKafkaConf is not exposed by the library, yet it appears in various exposed functions, like topicOffsetsForTime :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> TopicName -> m (Either KafkaError [TopicPartition]).

In turn, this means for API consumers that it's pretty unclear what must be passed to functions like topicOffsetsForTime.

List of missing API I found:

  • HasKafkaConf
  • HasKafka
  • HasTopicConf
  • KafkaConf
  • Kafka
  • TopicConf

Side question (maybe unrelated, let me know if this deserves another issue): Why are some functions using a concrete type (e.g. rebalanceCallback uses the concrete type KafkaConf) while others use the type class (e.g. statsCallback uses the constraint HasKafkaConf)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions