MCPcopy
hub / github.com/grafana/tempo / ReadRange

Method ReadRange

tempodb/backend/s3/s3.go:560–569  ·  view source on GitHub ↗

ReadRange implements backend.Reader

(ctx context.Context, name string, keypath backend.KeyPath, offset uint64, buffer []byte, _ *backend.CacheInfo)

Source from the content-addressed store, hash-verified

558
559// ReadRange implements backend.Reader
560func (rw *readerWriter) ReadRange(ctx context.Context, name string, keypath backend.KeyPath, offset uint64, buffer []byte, _ *backend.CacheInfo) error {
561 derivedCtx, span := tracer.Start(ctx, "s3.ReadRange", trace.WithAttributes(
562 attribute.Int("len", len(buffer)),
563 attribute.Int64("offset", int64(offset)),
564 ))
565 defer span.End()
566
567 keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
568 return readError(rw.readRange(derivedCtx, backend.ObjectFileName(keypath, name), int64(offset), buffer))
569}
570
571// Shutdown implements backend.Reader
572func (rw *readerWriter) Shutdown() {

Callers

nothing calls this directly

Calls 6

readRangeMethod · 0.95
KeyPathWithPrefixFunction · 0.92
ObjectFileNameFunction · 0.92
IntMethod · 0.80
readErrorFunction · 0.70
StartMethod · 0.65

Tested by

no test coverage detected