mirror of
https://github.com/rancher/os.git
synced 2025-09-02 15:24:32 +00:00
Update vendor
This commit is contained in:
33
vendor/github.com/docker/containerd/supervisor/checkpoint.go
generated
vendored
Normal file
33
vendor/github.com/docker/containerd/supervisor/checkpoint.go
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// +build !windows
|
||||
|
||||
package supervisor
|
||||
|
||||
import "github.com/docker/containerd/runtime"
|
||||
|
||||
type CreateCheckpointTask struct {
|
||||
baseTask
|
||||
ID string
|
||||
Checkpoint *runtime.Checkpoint
|
||||
}
|
||||
|
||||
func (s *Supervisor) createCheckpoint(t *CreateCheckpointTask) error {
|
||||
i, ok := s.containers[t.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
return i.container.Checkpoint(*t.Checkpoint)
|
||||
}
|
||||
|
||||
type DeleteCheckpointTask struct {
|
||||
baseTask
|
||||
ID string
|
||||
Checkpoint *runtime.Checkpoint
|
||||
}
|
||||
|
||||
func (s *Supervisor) deleteCheckpoint(t *DeleteCheckpointTask) error {
|
||||
i, ok := s.containers[t.ID]
|
||||
if !ok {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
return i.container.DeleteCheckpoint(t.Checkpoint.Name)
|
||||
}
|
Reference in New Issue
Block a user