MCPcopy
hub / github.com/segmentio/kafka-go / findPartitions

Function findPartitions

groupbalancer.go:290–298  ·  view source on GitHub ↗

findPartitions extracts the partition ids associated with the topic from the list of Partitions provided.

(topic string, partitions []Partition)

Source from the content-addressed store, hash-verified

288// findPartitions extracts the partition ids associated with the topic from the
289// list of Partitions provided.
290func findPartitions(topic string, partitions []Partition) []int {
291 var ids []int
292 for _, partition := range partitions {
293 if partition.Topic == topic {
294 ids = append(ids, partition.ID)
295 }
296 }
297 return ids
298}
299
300// findMembersByTopic groups the memberGroupMetadata by topic.
301func findMembersByTopic(members []GroupMember) map[string][]GroupMember {

Callers 2

AssignGroupsMethod · 0.85
AssignGroupsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected