MCPcopy
hub / github.com/elastic/go-elasticsearch / Read

Method Read

esutil/json_reader.go:63–68  ·  view source on GitHub ↗

Read implements the io.Reader interface.

(p []byte)

Source from the content-addressed store, hash-verified

61
62// Read implements the io.Reader interface.
63func (r *JSONReader) Read(p []byte) (int, error) {
64 if err := r.ensureEncoded(); err != nil {
65 return 0, err
66 }
67 return r.buf.Read(p)
68}
69
70// Seek implements the io.Seeker interface.
71func (r *JSONReader) Seek(offset int64, whence int) (int64, error) {

Callers 4

TestJSONReaderFunction · 0.95
TestAutoDrainingReaderFunction · 0.45

Calls 1

ensureEncodedMethod · 0.95

Tested by 4

TestJSONReaderFunction · 0.76
TestAutoDrainingReaderFunction · 0.36