MCPcopy
hub / github.com/containerd/containerd / checkpointTask

Method checkpointTask

client/task.go:730–750  ·  view source on GitHub ↗
(ctx context.Context, index *v1.Index, request *tasks.CheckpointTaskRequest)

Source from the content-addressed store, hash-verified

728}
729
730func (t *task) checkpointTask(ctx context.Context, index *v1.Index, request *tasks.CheckpointTaskRequest) error {
731 response, err := t.client.TaskService().Checkpoint(ctx, request)
732 if err != nil {
733 return errgrpc.ToNative(err)
734 }
735 // NOTE: response.Descriptors can be an empty slice if checkpoint image is jumped
736 // add the checkpoint descriptors to the index
737 for _, d := range response.Descriptors {
738 index.Manifests = append(index.Manifests, v1.Descriptor{
739 MediaType: d.MediaType,
740 Size: d.Size,
741 Digest: digest.Digest(d.Digest),
742 Platform: &v1.Platform{
743 OS: goruntime.GOOS,
744 Architecture: goruntime.GOARCH,
745 },
746 Annotations: d.Annotations,
747 })
748 }
749 return nil
750}
751
752func (t *task) checkpointRWSnapshot(ctx context.Context, index *v1.Index, snapshotterName string, id string) error {
753 opts := []diff.Opt{

Callers 1

CheckpointMethod · 0.95

Calls 3

TaskServiceMethod · 0.80
CheckpointMethod · 0.65
DigestMethod · 0.65

Tested by

no test coverage detected