MCPcopy
hub / github.com/containerd/containerd / checkpointRWSnapshot

Method checkpointRWSnapshot

client/task.go:752–766  ·  view source on GitHub ↗
(ctx context.Context, index *v1.Index, snapshotterName string, id string)

Source from the content-addressed store, hash-verified

750}
751
752func (t *task) checkpointRWSnapshot(ctx context.Context, index *v1.Index, snapshotterName string, id string) error {
753 opts := []diff.Opt{
754 diff.WithReference(fmt.Sprintf("checkpoint-rw-%s", id)),
755 }
756 rw, err := rootfs.CreateDiff(ctx, id, t.client.SnapshotService(snapshotterName), t.client.DiffService(), opts...)
757 if err != nil {
758 return err
759 }
760 rw.Platform = &v1.Platform{
761 OS: goruntime.GOOS,
762 Architecture: goruntime.GOARCH,
763 }
764 index.Manifests = append(index.Manifests, rw)
765 return nil
766}
767
768func (t *task) checkpointImage(ctx context.Context, index *v1.Index, image string) error {
769 if image == "" {

Callers 1

CheckpointMethod · 0.95

Calls 4

WithReferenceFunction · 0.92
CreateDiffFunction · 0.92
DiffServiceMethod · 0.80
SnapshotServiceMethod · 0.65

Tested by

no test coverage detected