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

Method WriteTo

protocol/buffer.go:569–578  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

567}
568
569func (ref *pageRef) WriteTo(w io.Writer) (wn int64, err error) {
570 ref.scan(ref.cursor, func(b []byte) bool {
571 var n int
572 n, err = w.Write(b)
573 wn += int64(n)
574 return err == nil
575 })
576 ref.cursor += wn
577 return
578}
579
580func (ref *pageRef) scan(off int64, f func([]byte) bool) {
581 begin := ref.offset + off

Callers 3

WriteRequestFunction · 0.45
writerEncodeFuncOfFunction · 0.45
WriteResponseFunction · 0.45

Calls 2

scanMethod · 0.95
WriteMethod · 0.45

Tested by

no test coverage detected