Add assigns a topic with a number partitions to a member.
(memberID, topic string, partitions ...int32)
| 31 | |
| 32 | // Add assigns a topic with a number partitions to a member. |
| 33 | func (p BalanceStrategyPlan) Add(memberID, topic string, partitions ...int32) { |
| 34 | if len(partitions) == 0 { |
| 35 | return |
| 36 | } |
| 37 | if _, ok := p[memberID]; !ok { |
| 38 | p[memberID] = make(map[string][]int32, 1) |
| 39 | } |
| 40 | p[memberID][topic] = append(p[memberID][topic], partitions...) |
| 41 | } |
| 42 | |
| 43 | // -------------------------------------------------------------------- |
| 44 |
no outgoing calls
no test coverage detected