transfer: add OCI descriptors to Progress structure
The index media type and the digest are now shown in `ctr images pull --local=false` Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -106,6 +106,7 @@ func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.Progre
|
||||
Parents: job.parents,
|
||||
Progress: status.Offset,
|
||||
Total: status.Total,
|
||||
Desc: &job.desc,
|
||||
})
|
||||
job.progress = status.Offset
|
||||
job.state = jobInProgress
|
||||
@@ -122,6 +123,7 @@ func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.Progre
|
||||
Parents: job.parents,
|
||||
Progress: job.desc.Size,
|
||||
Total: job.desc.Size,
|
||||
Desc: &job.desc,
|
||||
})
|
||||
|
||||
}
|
||||
@@ -165,6 +167,7 @@ func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.Progre
|
||||
//Digest: desc.Digest.String(),
|
||||
Progress: 0,
|
||||
Total: update.desc.Size,
|
||||
Desc: &job.desc,
|
||||
})
|
||||
}
|
||||
if update.exists {
|
||||
@@ -173,6 +176,7 @@ func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.Progre
|
||||
Name: remotes.MakeRefKey(ctx, update.desc),
|
||||
Progress: update.desc.Size,
|
||||
Total: update.desc.Size,
|
||||
Desc: &job.desc,
|
||||
})
|
||||
job.state = jobComplete
|
||||
job.progress = job.desc.Size
|
||||
|
||||
Reference in New Issue
Block a user