MCPcopy
hub / github.com/containerd/containerd / WithCheckpointImage

Function WithCheckpointImage

client/container_checkpoint_opts.go:46–53  ·  view source on GitHub ↗

WithCheckpointImage includes the container image in the checkpoint

(ctx context.Context, client *Client, c *containers.Container, index *imagespec.Index, copts *options.CheckpointOptions)

Source from the content-addressed store, hash-verified

44
45// WithCheckpointImage includes the container image in the checkpoint
46func WithCheckpointImage(ctx context.Context, client *Client, c *containers.Container, index *imagespec.Index, copts *options.CheckpointOptions) error {
47 ir, err := client.ImageService().Get(ctx, c.Image)
48 if err != nil {
49 return err
50 }
51 index.Manifests = append(index.Manifests, ir.Target)
52 return nil
53}
54
55// WithCheckpointTask includes the running task
56func WithCheckpointTask(ctx context.Context, client *Client, c *containers.Container, index *imagespec.Index, copts *options.CheckpointOptions) error {

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
ImageServiceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…