mounter

package
v0.0.0-...-a1208dc Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMountMetaFile

func ReadMountMetaFile(mounter Mounter, workingDir string) (string, error)

func WriteMountMetaFile

func WriteMountMetaFile(mounter Mounter, workingDir, mergedDir string) error

Types

type FsMeta

type FsMeta struct {
	MountType  MountType
	WorkingDir string
	MergedDir  string
}

type MountType

type MountType string
const (
	// Plain unpacks all layers to same directory, override files with same filename
	// layers[0] ---> untar ---> dest
	// layers[1] ---> untar ---> dest
	// ....
	Plain MountType = "plain"
)

type Mounter

type Mounter interface {
	Mount(layers []string, workingDir, mergedDir string) error
	Umount(workingDir string) error
	GetType() MountType
}

func NewMounter

func NewMounter(mountType MountType) Mounter

type RawMounter

type RawMounter struct {
}

func (*RawMounter) GetType

func (m *RawMounter) GetType() MountType

func (*RawMounter) Mount

func (m *RawMounter) Mount(layers []string, workingDir, mergedDir string) error

func (*RawMounter) Umount

func (m *RawMounter) Umount(workingDir string) error

Jump to

Keyboard shortcuts

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