File: checkpoint_create.go

package info (click to toggle)
golang-github-docker-engine-api 0.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,064 kB
  • sloc: makefile: 19
file content (13 lines) | stat: -rw-r--r-- 430 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
package client

import (
	"github.com/docker/engine-api/types"
	"golang.org/x/net/context"
)

// CheckpointCreate creates a checkpoint from the given container with the given name
func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error {
	resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil)
	ensureReaderClosed(resp)
	return err
}