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

Method writeTo

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

Source from the content-addressed store, hash-verified

114}
115
116func (r topicMetadataRequestV1) writeTo(wb *writeBuffer) {
117 // communicate nil-ness to the broker by passing -1 as the array length.
118 // for this particular request, the broker interpets a zero length array
119 // as a request for no topics whereas a nil array is for all topics.
120 if r == nil {
121 wb.writeArrayLen(-1)
122 } else {
123 wb.writeStringArray([]string(r))
124 }
125}
126
127type metadataResponseV1 struct {
128 Brokers []brokerMetadataV1

Callers

nothing calls this directly

Calls 2

writeArrayLenMethod · 0.80
writeStringArrayMethod · 0.80

Tested by

no test coverage detected