()
| 167 | } |
| 168 | |
| 169 | func (m *PartitionRingDesc) maxPartitionID() int32 { |
| 170 | var max int32 = -1 |
| 171 | for id := range m.Partitions { |
| 172 | if id > max { |
| 173 | max = id |
| 174 | } |
| 175 | } |
| 176 | return max |
| 177 | } |
| 178 | |
| 179 | // WithPartitions returns a new PartitionRingDesc with only the specified partitions and their owners included. |
| 180 | func (m *PartitionRingDesc) WithPartitions(partitions map[int32]struct{}) PartitionRingDesc { |
no outgoing calls
no test coverage detected