()
| 85 | } |
| 86 | |
| 87 | func (t *TopicPartitionsConfig) assignments() []createpartitions.RequestAssignment { |
| 88 | if len(t.TopicPartitionAssignments) == 0 { |
| 89 | return nil |
| 90 | } |
| 91 | assignments := make([]createpartitions.RequestAssignment, len(t.TopicPartitionAssignments)) |
| 92 | for i, a := range t.TopicPartitionAssignments { |
| 93 | assignments[i] = createpartitions.RequestAssignment{ |
| 94 | BrokerIDs: a.BrokerIDs, |
| 95 | } |
| 96 | } |
| 97 | return assignments |
| 98 | } |
| 99 | |
| 100 | type TopicPartitionAssignment struct { |
| 101 | // Broker IDs |