| 18 | type DataMap map[blob.ID][]byte |
| 19 | |
| 20 | type mapStorage struct { |
| 21 | blob.DefaultProviderImplementation |
| 22 | // +checklocks:mutex |
| 23 | data DataMap |
| 24 | // +checklocks:mutex |
| 25 | keyTime map[blob.ID]time.Time |
| 26 | // +checklocks:mutex |
| 27 | timeNow func() time.Time |
| 28 | // +checklocks:mutex |
| 29 | totalBytes int64 |
| 30 | // +checklocksignore |
| 31 | limit int64 |
| 32 | mutex sync.RWMutex |
| 33 | } |
| 34 | |
| 35 | func (s *mapStorage) GetCapacity(ctx context.Context) (blob.Capacity, error) { |
| 36 | if err := ctx.Err(); err != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected