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

Method Read

asyncbuffer/buffer_test.go:84–91  ·  view source on GitHub ↗

Read reads data from the testReader, simulating a slow read and a potential failure

(p []byte)

Source from the content-addressed store, hash-verified

82
83// Read reads data from the testReader, simulating a slow read and a potential failure
84func (r *blockingReader) Read(p []byte) (n int, err error) {
85 if !r.unlocking.Load() {
86 r.mu.Lock()
87 }
88
89 n, err = r.reader.Read(p)
90 return n, err
91}
92
93func (r *blockingReader) Close() error { // Close forwards closing to the underlying reader
94 return r.reader.Close()

Callers

nothing calls this directly

Calls 2

LoadMethod · 0.80
ReadMethod · 0.45

Tested by

no test coverage detected