Read implements backend.Reader
(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo)
| 301 | |
| 302 | // Read implements backend.Reader |
| 303 | func (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 |
| 319 | func (rw *Azure) ReadRange(ctx context.Context, name string, keypath backend.KeyPath, offset uint64, buffer []byte, _ *backend.CacheInfo) error { |
nothing calls this directly
no test coverage detected