Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FetchTopic: add EachPartition; FetchPartition: add EachRecord
This adds helpers that are already (nearly) duplicates on other types. Fetches itself has EachPartition, but the callback takes FetchTopicPartition so that the user can know the topic of the partition. Because the user already has the topic for FetchTopic, its EachPartition callback uses a FetchPartition. FetchPartition's EachRecord is an exact mirror of FetchTopicPartition's EachRecord. There could be a few more callbacks but I'm not sure the use of them yet. For example, EachRecord on FetchTopic makes a little bit less sense because users are likely more interested in finer grained detail if they're using an API that returns a FetchTopic. EachRecords on Fetches makes sense because it inherently means the users are only interested in records, and it makes sense on Fetch{,Topic}Partition since it completes the Each callbacks as an alternative to for loops.
- Loading branch information