erofs

package
v1.78.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend handles package lifecycle using erofs images with dm-verity integrity. Operations are serialized via mutex to prevent concurrent mount/unmount conflicts.

func NewBackend

func NewBackend(registry registryService, workingDir string, logger *log.Logger) *Backend

NewBackend creates a disk backend for packages.

func (*Backend) Attach

func (b *Backend) Attach(ctx context.Context, repo registry.Remote, instance, packageName, version string) error

Attach fetches the image of version from the registry, stores it and mounts it at the deployed path.

func (*Backend) Cleanup

func (b *Backend) Cleanup(ctx context.Context, preserve []disk.PreservePackage) error

Cleanup unmounts deployed packages and removes package images not listed in preserve.

func (*Backend) Detach

func (b *Backend) Detach(ctx context.Context, instance string) error

Detach unmounts the erofs image and closes the dm-verity mapper. The stored image stays: only Cleanup purges files, since every version of the package, a Candidate's included, shares its directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL