mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-27 02:54:27 +01:00
Modify lisense header from 2018 to 2019. Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
24 lines
912 B
Go
24 lines
912 B
Go
// Copyright (c) 2019 Huawei Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package persistapi
|
|
|
|
// PersistDriver is interface describing operations to save/restore persist data
|
|
type PersistDriver interface {
|
|
// ToDisk flushes data to disk(or other storage media such as a remote db)
|
|
ToDisk() error
|
|
// FromDisk will restore all data for sandbox with `sid` from storage.
|
|
// We only support get data for one whole sandbox
|
|
FromDisk(sid string) error
|
|
// AddSaveCallback addes callback function named `name` to driver storage list
|
|
// The callback functions will be invoked when calling `ToDisk()`, notice that
|
|
// callback functions are not order guaranteed,
|
|
AddSaveCallback(name string, f SetFunc)
|
|
// Destroy will remove everything from storage
|
|
Destroy() error
|
|
// GetStates will return SandboxState and ContainerState(s) directly
|
|
GetStates() (*SandboxState, map[string]ContainerState, error)
|
|
}
|