(topic string, partition int32, time, offset int64)
| 234 | } |
| 235 | |
| 236 | func (mor *MockOffsetResponse) SetOffset(topic string, partition int32, time, offset int64) *MockOffsetResponse { |
| 237 | partitions := mor.offsets[topic] |
| 238 | if partitions == nil { |
| 239 | partitions = make(map[int32]map[int64]int64) |
| 240 | mor.offsets[topic] = partitions |
| 241 | } |
| 242 | times := partitions[partition] |
| 243 | if times == nil { |
| 244 | times = make(map[int64]int64) |
| 245 | partitions[partition] = times |
| 246 | } |
| 247 | times[time] = offset |
| 248 | return mor |
| 249 | } |
| 250 | |
| 251 | func (mor *MockOffsetResponse) For(reqBody versionedDecoder) encoderWithHeader { |
| 252 | offsetRequest := reqBody.(*OffsetRequest) |
no outgoing calls