(ctx context.Context, entry *CacheEntry)
| 294 | } |
| 295 | |
| 296 | func (s *FileStore) compactIJson(ctx context.Context, entry *CacheEntry) error { |
| 297 | // we don't need to lock the entry because we have the lock on the filestore |
| 298 | _, fullData, err := entry.readAt(ctx, 0, 0, true) |
| 299 | if err != nil { |
| 300 | return err |
| 301 | } |
| 302 | newBytes, err := ijson.CompactIJson(fullData, entry.File.Opts.IJsonBudget) |
| 303 | if err != nil { |
| 304 | return err |
| 305 | } |
| 306 | entry.writeAt(0, newBytes, true) |
| 307 | return nil |
| 308 | } |
| 309 | |
| 310 | func (s *FileStore) CompactIJson(ctx context.Context, zoneId string, name string) error { |
| 311 | return withLock(s, zoneId, name, func(entry *CacheEntry) error { |
no test coverage detected