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

Method Truncate

protocol/buffer.go:137–141  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

135func (p *page) Size() int64 { return int64(p.length) }
136
137func (p *page) Truncate(n int) {
138 if n < p.length {
139 p.length = n
140 }
141}
142
143func (p *page) ReadAt(b []byte, off int64) (int, error) {
144 if off -= p.offset; off < 0 || off > pageSize {

Callers 9

makeTestSequenceFunction · 0.45
writeToVersion1Method · 0.45
TruncateMethod · 0.45
TestFetchResponseFunction · 0.45
BenchmarkFetchResponseFunction · 0.45
TestProduceRequestFunction · 0.45
BenchmarkProduceRequestFunction · 0.45
TestRawProduceRequestFunction · 0.45
BenchmarkProduceRequestFunction · 0.45

Calls

no outgoing calls

Tested by 7

makeTestSequenceFunction · 0.36
TestFetchResponseFunction · 0.36
BenchmarkFetchResponseFunction · 0.36
TestProduceRequestFunction · 0.36
BenchmarkProduceRequestFunction · 0.36
TestRawProduceRequestFunction · 0.36
BenchmarkProduceRequestFunction · 0.36