Documentation
¶
Index ¶
- Constants
- type Interface
- type Merge
- type Overwrite
- func (n Overwrite) Commit(trans *Transaction, cleanup func() error) (err error)
- func (n Overwrite) GenerateKernelCmdline(*Transaction) string
- func (n Overwrite) GetActiveSnapshotIDs() ([]int, error)
- func (n Overwrite) Init(deployment.Deployment) (UpgradeHelper, error)
- func (n Overwrite) Lock(*Transaction) error
- func (n Overwrite) Merge(*Transaction) error
- func (n Overwrite) MountPartition(root string, hwParts block.PartitionList, p *deployment.Partition) error
- func (n Overwrite) Rollback(*Transaction, error) error
- func (n Overwrite) Start() (*Transaction, error)
- func (n Overwrite) SyncImageContent(imgSrc *deployment.ImageSource, trans *Transaction, opts ...unpack.Opt) (err error)
- func (n Overwrite) UpdateFstab(trans *Transaction) error
- type Transaction
- type UpgradeHelper
Constants ¶
View Source
const FstabFile = "/etc/fstab"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
Init(deployment.Deployment) (UpgradeHelper, error)
Start() (*Transaction, error)
Commit(trans *Transaction, cleanup func() error) error
Rollback(*Transaction, error) error
GetActiveSnapshotIDs() ([]int, error)
}
func New ¶
func New(ctx context.Context, s *sys.System, d *deployment.Deployment, name string) (Interface, error)
func NewOverwrite ¶
func NewOverwrite(ctx context.Context, s *sys.System, d *deployment.Deployment, lsBlk block.Device) Interface
type Overwrite ¶
type Overwrite struct {
// contains filtered or unexported fields
}
Overwrite transaction snapshotter is a passthrough snapshotter built to be able to verify that the transaction code works as advertised and verify the transaction interface. Should only be used for debugging.
func (Overwrite) Commit ¶
func (n Overwrite) Commit(trans *Transaction, cleanup func() error) (err error)
func (Overwrite) GenerateKernelCmdline ¶
func (n Overwrite) GenerateKernelCmdline(*Transaction) string
func (Overwrite) GetActiveSnapshotIDs ¶
func (Overwrite) Init ¶
func (n Overwrite) Init(deployment.Deployment) (UpgradeHelper, error)
func (Overwrite) Lock ¶
func (n Overwrite) Lock(*Transaction) error
func (Overwrite) Merge ¶
func (n Overwrite) Merge(*Transaction) error
func (Overwrite) MountPartition ¶
func (n Overwrite) MountPartition(root string, hwParts block.PartitionList, p *deployment.Partition) error
func (Overwrite) Start ¶
func (n Overwrite) Start() (*Transaction, error)
func (Overwrite) SyncImageContent ¶
func (n Overwrite) SyncImageContent(imgSrc *deployment.ImageSource, trans *Transaction, opts ...unpack.Opt) (err error)
func (Overwrite) UpdateFstab ¶
func (n Overwrite) UpdateFstab(trans *Transaction) error
type Transaction ¶
type UpgradeHelper ¶
type UpgradeHelper interface {
SyncImageContent(*deployment.ImageSource, *Transaction, ...unpack.Opt) error
Merge(*Transaction) error
UpdateFstab(*Transaction) error
Lock(*Transaction) error
GenerateKernelCmdline(*Transaction) string
}
Click to show internal directories.
Click to hide internal directories.