MCPcopy Create free account
hub / github.com/cortexproject/cortex / Read

Method Read

pkg/util/grpcencoding/snappyblock/snappyblock.go:135–143  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

133}
134
135func (r *reader) Read(p []byte) (n int, err error) {
136 n, err = r.dbuff.Read(p)
137 if err == io.EOF {
138 r.cbuff.Reset()
139 r.dst = r.dst[0:cap(r.dst)]
140 r.pool.Put(r)
141 }
142 return n, err
143}

Callers

nothing calls this directly

Calls 2

PutMethod · 0.65
ResetMethod · 0.45

Tested by

no test coverage detected