()
| 205 | } |
| 206 | |
| 207 | func (t TopicConfig) toCreateTopicsRequestV0Topic() createTopicsRequestV0Topic { |
| 208 | requestV0ReplicaAssignments := make([]createTopicsRequestV0ReplicaAssignment, 0, len(t.ReplicaAssignments)) |
| 209 | for _, a := range t.ReplicaAssignments { |
| 210 | requestV0ReplicaAssignments = append( |
| 211 | requestV0ReplicaAssignments, |
| 212 | a.toCreateTopicsRequestV0ReplicaAssignment()) |
| 213 | } |
| 214 | requestV0ConfigEntries := make([]createTopicsRequestV0ConfigEntry, 0, len(t.ConfigEntries)) |
| 215 | for _, c := range t.ConfigEntries { |
| 216 | requestV0ConfigEntries = append( |
| 217 | requestV0ConfigEntries, |
| 218 | c.toCreateTopicsRequestV0ConfigEntry()) |
| 219 | } |
| 220 | |
| 221 | return createTopicsRequestV0Topic{ |
| 222 | Topic: t.Topic, |
| 223 | NumPartitions: int32(t.NumPartitions), |
| 224 | ReplicationFactor: int16(t.ReplicationFactor), |
| 225 | ReplicaAssignments: requestV0ReplicaAssignments, |
| 226 | ConfigEntries: requestV0ConfigEntries, |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | type createTopicsRequestV0Topic struct { |
| 231 | // Topic name |
no test coverage detected