(ctx context.Context, rep repo.DirectRepositoryWriter)
| 24 | } |
| 25 | |
| 26 | func (c *commandCachePrefetch) run(ctx context.Context, rep repo.DirectRepositoryWriter) error { |
| 27 | var oids []object.ID |
| 28 | |
| 29 | for _, s := range c.objectIDs { |
| 30 | oid, err := snapshotfs.ParseObjectIDWithPath(ctx, rep, s) |
| 31 | if err != nil { |
| 32 | return errors.Wrapf(err, "unable to parse ID: %v", s) |
| 33 | } |
| 34 | |
| 35 | oids = append(oids, oid) |
| 36 | } |
| 37 | |
| 38 | cids, err := rep.PrefetchObjects(ctx, oids, c.hint) |
| 39 | |
| 40 | log(ctx).Infof("prefetched %v contents", len(cids)) |
| 41 | |
| 42 | return errors.Wrap(err, "error prefetching") |
| 43 | } |
nothing calls this directly
no test coverage detected