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

Method ReadRange

tempodb/backend/azure/azure.go:319–335  ·  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

317
318// ReadRange implements backend.Reader
319func (rw *Azure) ReadRange(ctx context.Context, name string, keypath backend.KeyPath, offset uint64, buffer []byte, _ *backend.CacheInfo) error {
320 keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
321
322 derivedCtx, span := tracer.Start(ctx, "azure.ReadRange", trace.WithAttributes(
323 attribute.Int("len", len(buffer)),
324 attribute.Int64("offset", int64(offset)),
325 ))
326 defer span.End()
327
328 object := backend.ObjectFileName(keypath, name)
329 err := rw.readRange(derivedCtx, object, int64(offset), buffer)
330 if err != nil {
331 return readError(err)
332 }
333
334 return nil
335}
336
337// Shutdown implements backend.Reader
338func (rw *Azure) 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