mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-28 19:44:21 +01:00
Demonstrate how to make use of `virtcontainer/persist/api` data structure package. Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
17 lines
405 B
Go
17 lines
405 B
Go
// Copyright (c) 2018 Huawei Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package persistapi
|
|
|
|
// PersistDriver is interface describing operations to save/restore persist data
|
|
type PersistDriver interface {
|
|
// Dump persist data to
|
|
Dump() error
|
|
Restore(sid string) error
|
|
Destroy() error
|
|
GetStates() (*SandboxState, map[string]ContainerState, error)
|
|
RegisterHook(name string, f SetFunc)
|
|
}
|