MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / Reader

Method Reader

cache/tmp_file_response_writer.go:68–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66}
67
68func (rw *TmpFileResponseWriter) Reader() (io.Reader, error) {
69 f, err := rw.GetFile()
70 if err != nil {
71 return nil, fmt.Errorf("cannot open tmp file: %w", err)
72 }
73 return f, nil
74}
75
76func (rw *TmpFileResponseWriter) ResetFileOffset() error {
77 data, err := rw.GetFile()

Callers 3

serveFromCacheMethod · 0.95
TestWriteThenReadContentFunction · 0.95
TestCacheCleanFunction · 0.95

Calls 1

GetFileMethod · 0.95

Tested by 2

TestWriteThenReadContentFunction · 0.76
TestCacheCleanFunction · 0.76