makeCommits generates a slice of commits from a list of messages, it extracts the topic, partition, and offset of each message and builds the corresponding commit slice.
(msgs ...Message)
| 22 | // the topic, partition, and offset of each message and builds the corresponding |
| 23 | // commit slice. |
| 24 | func makeCommits(msgs ...Message) []commit { |
| 25 | commits := make([]commit, len(msgs)) |
| 26 | |
| 27 | for i, m := range msgs { |
| 28 | commits[i] = makeCommit(m) |
| 29 | } |
| 30 | |
| 31 | return commits |
| 32 | } |
| 33 | |
| 34 | // commitRequest is the data type exchanged between the CommitMessages method |
| 35 | // and internals of the reader's implementation. |
searching dependent graphs…