types

package
v0.0.0-...-50458b4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

To avoid circular imports between db/mount/etc. packages, let's define the basic atomfs types in their own package that everyone will then import.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Umount

func Umount(config Config, dest string) error

Types

type Atom

type Atom struct {
	ID   int64
	Name string
	Hash string
	Type AtomType
}

type AtomType

type AtomType string
const (
	TarAtom      AtomType = "tar"
	SquashfsAtom AtomType = "squashfs"
)

type Config

type Config interface {
	AtomsPath(parts ...string) string
	MountedAtomsPath(parts ...string) string
	OverlayDirsPath(parts ...string) string
}

type DBBasedConfig

type DBBasedConfig struct {
	Path string
}

func NewDBBasedConfig

func NewDBBasedConfig(path string) (DBBasedConfig, error)

func (DBBasedConfig) AtomsPath

func (c DBBasedConfig) AtomsPath(parts ...string) string

func (DBBasedConfig) MountedAtomsPath

func (c DBBasedConfig) MountedAtomsPath(parts ...string) string

func (DBBasedConfig) OverlayDirsPath

func (c DBBasedConfig) OverlayDirsPath(parts ...string) string

func (DBBasedConfig) RelativePath

func (c DBBasedConfig) RelativePath(parts ...string) string

type Molecule

type Molecule struct {
	ID   int64
	Name string
	// Atoms is the list of atoms in this Molecule. The first element in
	// this list is the top most layer in the overlayfs.
	Atoms []Atom
	// contains filtered or unexported fields
}

func NewMolecule

func NewMolecule(config Config) Molecule

func (Molecule) Mount

func (m Molecule) Mount(dest string, writable bool) error

func (Molecule) MountUnderlyingAtoms

func (m Molecule) MountUnderlyingAtoms() error

MountUnderlyingAtoms mounts all the underlying atoms at config.MountedAtomsPath().

func (Molecule) OverlayArgs

func (m Molecule) OverlayArgs(dest string, writable bool) (string, error)

OverlayArgs returns all of the mount options to pass to the kernel to actually mount this molecule.

Jump to

Keyboard shortcuts

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