MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Read

Method Read

asyncbuffer/reader.go:16–23  ·  view source on GitHub ↗

Read reads data from the AsyncBuffer.

(p []byte)

Source from the content-addressed store, hash-verified

14
15// Read reads data from the AsyncBuffer.
16func (r *Reader) Read(p []byte) (int, error) {
17 n, err := r.ab.ReadAt(p, r.pos)
18 if err == nil {
19 r.pos += int64(n)
20 }
21
22 return n, err
23}
24
25// Seek sets the position of the reader to the given offset and returns the new position
26func (r *Reader) Seek(offset int64, whence int) (int64, error) {

Calls 1

ReadAtMethod · 0.80