MCPcopy
hub / github.com/segmentio/kafka-go / writeTo

Method writeTo

metadata.go:212–222  ·  view source on GitHub ↗
(wb *writeBuffer)

Source from the content-addressed store, hash-verified

210}
211
212func (r topicMetadataRequestV6) writeTo(wb *writeBuffer) {
213 // communicate nil-ness to the broker by passing -1 as the array length.
214 // for this particular request, the broker interpets a zero length array
215 // as a request for no topics whereas a nil array is for all topics.
216 if r.Topics == nil {
217 wb.writeArrayLen(-1)
218 } else {
219 wb.writeStringArray([]string(r.Topics))
220 }
221 wb.writeBool(r.AllowAutoTopicCreation)
222}
223
224type metadataResponseV6 struct {
225 ThrottleTimeMs int32

Callers

nothing calls this directly

Calls 3

writeArrayLenMethod · 0.80
writeStringArrayMethod · 0.80
writeBoolMethod · 0.80

Tested by

no test coverage detected