mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Not perfect yet, but addressing some godoc "doc" links that needed to be updated, and touching up some references. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
20 lines
489 B
Go
20 lines
489 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/moby/moby/api/types/checkpoint"
|
|
)
|
|
|
|
// CheckpointCreate creates a checkpoint from the given container.
|
|
func (cli *Client) CheckpointCreate(ctx context.Context, containerID string, options checkpoint.CreateOptions) error {
|
|
containerID, err := trimID("container", containerID)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
resp, err := cli.post(ctx, "/containers/"+containerID+"/checkpoints", nil, options, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|