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

Method Read

tempodb/backend/azure/azure.go:303–316  ·  view source on GitHub ↗

Read implements backend.Reader

(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo)

Source from the content-addressed store, hash-verified

301
302// Read implements backend.Reader
303func (rw *Azure) Read(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo) (io.ReadCloser, int64, error) {
304 keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
305
306 derivedCtx, span := tracer.Start(ctx, "azure.Read")
307 defer span.End()
308
309 object := backend.ObjectFileName(keypath, name)
310 b, _, err := rw.readAll(derivedCtx, object)
311 if err != nil {
312 return nil, 0, readError(err)
313 }
314
315 return io.NopCloser(bytes.NewReader(b)), int64(len(b)), nil
316}
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 {

Callers

nothing calls this directly

Calls 5

readAllMethod · 0.95
KeyPathWithPrefixFunction · 0.92
ObjectFileNameFunction · 0.92
readErrorFunction · 0.70
StartMethod · 0.65

Tested by

no test coverage detected