Documentation
¶
Index ¶
- type Snapshot
- func (snp *Snapshot) Cleanup() error
- func (snp *Snapshot) CreateSnapDir() error
- func (snp *Snapshot) GetContainerSnapName() string
- func (snp *Snapshot) GetId() string
- func (snp *Snapshot) GetImage() string
- func (snp *Snapshot) GetInfoFilePath() string
- func (snp *Snapshot) GetMemFilePath() string
- func (snp *Snapshot) GetPatchFilePath() string
- func (snp *Snapshot) GetSnapshotFilePath() string
- func (snp *Snapshot) LoadSnapInfo(infoPath string) error
- func (snp *Snapshot) SerializeSnapInfo() error
- type SnapshotManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshot ¶
type Snapshot struct { ContainerSnapName string Image string // contains filtered or unexported fields }
Snapshot identified by revision Only capitalized fields are serialised / deserialised
func NewSnapshot ¶
func (*Snapshot) CreateSnapDir ¶
func (*Snapshot) GetContainerSnapName ¶
func (*Snapshot) GetInfoFilePath ¶
func (*Snapshot) GetMemFilePath ¶
func (*Snapshot) GetPatchFilePath ¶
func (*Snapshot) GetSnapshotFilePath ¶
func (*Snapshot) LoadSnapInfo ¶
LoadSnapInfo loads the snapshot info from a file. This can be useful for remote snapshots.
func (*Snapshot) SerializeSnapInfo ¶
SerializeSnapInfo serializes the snapshot info using gob. This can be useful for remote snapshots
type SnapshotManager ¶
SnapshotManager manages snapshots stored on the node.
func NewSnapshotManager ¶
func NewSnapshotManager(baseFolder string) *SnapshotManager
func (*SnapshotManager) AcquireSnapshot ¶
func (mgr *SnapshotManager) AcquireSnapshot(revision string) (*Snapshot, error)
AcquireSnapshot returns a snapshot for the specified revision if it is available.
func (*SnapshotManager) CommitSnapshot ¶
func (mgr *SnapshotManager) CommitSnapshot(revision string) error
CommitSnapshot finalizes the snapshot creation and makes it available for use.
func (*SnapshotManager) InitSnapshot ¶
func (mgr *SnapshotManager) InitSnapshot(revision, image string) (*Snapshot, error)
InitSnapshot initializes a snapshot by adding its metadata to the SnapshotManager. Once the snapshot has been created, CommitSnapshot must be run to finalize the snapshot creation and make the snapshot available for use.