verifyObject enqueues a single object for verification.
(ctx context.Context, e fs.Entry, oid object.ID, entryPath string)
| 191 | |
| 192 | // verifyObject enqueues a single object for verification. |
| 193 | func (v *Verifier) verifyObject(ctx context.Context, e fs.Entry, oid object.ID, entryPath string) error { |
| 194 | if v.throttle.ShouldOutput(time.Second) { |
| 195 | v.ShowStats(ctx) |
| 196 | } |
| 197 | |
| 198 | if !e.IsDir() { |
| 199 | v.fileWorkQueue <- verifyFileWorkItem{oid, entryPath, e.Size()} |
| 200 | |
| 201 | v.statsMu.Lock() |
| 202 | defer v.statsMu.Unlock() |
| 203 | |
| 204 | v.queued++ |
| 205 | } else { |
| 206 | v.statsMu.Lock() |
| 207 | defer v.statsMu.Unlock() |
| 208 | |
| 209 | v.queued++ |
| 210 | v.processed++ |
| 211 | } |
| 212 | |
| 213 | return nil |
| 214 | } |
| 215 | |
| 216 | func (v *Verifier) readEntireObject(ctx context.Context, oid object.ID, path string) error { |
| 217 | verifierLog(ctx).Debugf("reading object %v %v", oid, path) |