Documentation ¶
Index ¶
- func NewSnapshotter(cfg types.Config, snapCfg types.SnapshotterConfig, bootloader types.Bootloader) (types.Snapshotter, error)
- type Btrfs
- func (b *Btrfs) CloseTransaction(snapshot *types.Snapshot) (err error)
- func (b *Btrfs) CloseTransactionOnError(snapshot *types.Snapshot) (err error)
- func (b *Btrfs) DeleteSnapshot(id int) error
- func (b *Btrfs) GetSnapshots() (snapshots []int, err error)
- func (b *Btrfs) InitSnapshotter(state *types.Partition, efiDir string) error
- func (b *Btrfs) SnapshotToImageSource(snap *types.Snapshot) (*types.ImageSource, error)
- func (b *Btrfs) StartTransaction() (*types.Snapshot, error)
- type Date
- type LoopDevice
- func (l *LoopDevice) CloseTransaction(snapshot *types.Snapshot) (err error)
- func (l *LoopDevice) CloseTransactionOnError(snapshot *types.Snapshot) error
- func (l *LoopDevice) DeleteSnapshot(id int) error
- func (l *LoopDevice) GetSnapshots() ([]int, error)
- func (l *LoopDevice) InitSnapshotter(state *types.Partition, efiDir string) error
- func (l *LoopDevice) SnapshotToImageSource(snap *types.Snapshot) (*types.ImageSource, error)
- func (l *LoopDevice) StartTransaction() (*types.Snapshot, error)
- type SnapperSnapshotXML
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSnapshotter ¶
func NewSnapshotter(cfg types.Config, snapCfg types.SnapshotterConfig, bootloader types.Bootloader) (types.Snapshotter, error)
Types ¶
type Btrfs ¶
type Btrfs struct {
// contains filtered or unexported fields
}
func (*Btrfs) CloseTransaction ¶
func (*Btrfs) CloseTransactionOnError ¶
func (*Btrfs) DeleteSnapshot ¶
func (*Btrfs) GetSnapshots ¶
func (*Btrfs) InitSnapshotter ¶
func (*Btrfs) SnapshotToImageSource ¶
SnapshotImageToSource converts the given snapshot into an ImageSource. This is useful to deploy a system from a given snapshot, for instance setting the recovery image from a snapshot.
type LoopDevice ¶
type LoopDevice struct {
// contains filtered or unexported fields
}
func (*LoopDevice) CloseTransaction ¶
func (l *LoopDevice) CloseTransaction(snapshot *types.Snapshot) (err error)
CloseTransaction closes the transaction for the given snapshot. This is the responsible of setting new active and passive snapshots.
func (*LoopDevice) CloseTransactionOnError ¶
func (l *LoopDevice) CloseTransactionOnError(snapshot *types.Snapshot) error
CloseTransactionOnError is a destructor method to clean the given initated snapshot. Useful in case of an error once the transaction has already started.
func (*LoopDevice) DeleteSnapshot ¶
func (l *LoopDevice) DeleteSnapshot(id int) error
DeleteSnapshot deletes the snapshot of the given ID. It cannot delete an snapshot that is actually booted.
func (*LoopDevice) GetSnapshots ¶
func (l *LoopDevice) GetSnapshots() ([]int, error)
GetSnapshots returns a list of the available snapshots IDs.
func (*LoopDevice) InitSnapshotter ¶
func (l *LoopDevice) InitSnapshotter(state *types.Partition, efiDir string) error
InitSnapshotter initiates the snapshotter to the given root directory. More over this method includes logic to migrate from older elemental-toolkit versions.
func (*LoopDevice) SnapshotToImageSource ¶
func (l *LoopDevice) SnapshotToImageSource(snap *types.Snapshot) (*types.ImageSource, error)
SnapshotImageToSource converts the given snapshot into an ImageSource. This is useful to deploy a system from a given snapshot, for instance setting the recovery image from a snapshot.
func (*LoopDevice) StartTransaction ¶
func (l *LoopDevice) StartTransaction() (*types.Snapshot, error)
StartTransaction starts a transaction for this snapshotter instance and returns the work in progress snapshot object.