(p []byte, off int64, role cache.Role)
| 39 | } |
| 40 | |
| 41 | func (b *BackendReaderAt) ReadAtWithCache(p []byte, off int64, role cache.Role) (int, error) { |
| 42 | err := b.r.ReadRange(b.ctx, b.name, (uuid.UUID)(b.meta.BlockID), b.meta.TenantID, uint64(off), p, &backend.CacheInfo{ |
| 43 | Role: role, |
| 44 | Meta: b.meta, |
| 45 | }) |
| 46 | if isFatalError(err) { |
| 47 | return 0, err |
| 48 | } |
| 49 | b.bytesRead.Add(uint64(len(p))) |
| 50 | return len(p), err |
| 51 | } |
| 52 | |
| 53 | func (b *BackendReaderAt) BytesRead() uint64 { |
| 54 | return b.bytesRead.Load() |
no test coverage detected