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

Method writeTo

syncgroup.go:173–183  ·  view source on GitHub ↗
(wb *writeBuffer)

Source from the content-addressed store, hash-verified

171}
172
173func (t groupAssignment) writeTo(wb *writeBuffer) {
174 wb.writeInt16(t.Version)
175 wb.writeInt32(int32(len(t.Topics)))
176
177 for topic, partitions := range t.Topics {
178 wb.writeString(topic)
179 wb.writeInt32Array(partitions)
180 }
181
182 wb.writeBytes(t.UserData)
183}
184
185func (t *groupAssignment) readFrom(r *bufio.Reader, size int) (remain int, err error) {
186 // I came across this case when testing for compatibility with bsm/sarama-cluster. It

Callers 2

bytesMethod · 0.95
TestGroupAssignmentFunction · 0.95

Calls 5

writeInt32ArrayMethod · 0.80
writeInt16Method · 0.45
writeInt32Method · 0.45
writeStringMethod · 0.45
writeBytesMethod · 0.45

Tested by 1

TestGroupAssignmentFunction · 0.76