BlobrefStrings returns the sorted stringified blobrefs stored in s.
()
| 298 | |
| 299 | // BlobrefStrings returns the sorted stringified blobrefs stored in s. |
| 300 | func (s *Storage) BlobrefStrings() []string { |
| 301 | s.mu.RLock() |
| 302 | defer s.mu.RUnlock() |
| 303 | sorted := make([]string, 0, len(s.m)) |
| 304 | for br := range s.m { |
| 305 | sorted = append(sorted, br.String()) |
| 306 | } |
| 307 | sort.Strings(sorted) |
| 308 | return sorted |
| 309 | } |
| 310 | |
| 311 | // Stats returns the number of blobs and number of bytes that were fetched from s. |
| 312 | func (s *Storage) Stats() (blobsFetched, bytesFetched int64) { |