atomfs

package module
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: 15 Imported by: 0

README

atomfs

This code has moved and this repo is no longer maintained.

The new program for mounting and unmounting atomfs images is at project-machine/atomfs. The go package code is at project-stacker/pkg/atomfs.

Documentation

Overview

Note: this file is unused right now, but it describes how we could auto-correct our mountns. The problem is with the `atomfs mount` command, we need to propagate the mount to the right place, back outside of the atomfs mountns. Need better ideas on how to do this.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMoleculeFromOCI

func BuildMoleculeFromOCI(opts MountOCIOpts) (types.Molecule, error)

func UnmountOCI

func UnmountOCI(opts MountOCIOpts) error

Types

type Instance

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

func New

func New(config types.DBBasedConfig) (*Instance, error)

func (*Instance) Close

func (atomfs *Instance) Close() error

func (*Instance) CopyMolecule

func (atomfs *Instance) CopyMolecule(dest string, src string) (types.Molecule, error)

CopyMolecule simply duplicates a molecule's configuration under a new name. This is equivalent to a "snapshot" operation under other filesystems.

func (*Instance) CreateAtom

func (atomfs *Instance) CreateAtom(name string, atomType types.AtomType, content io.Reader) (types.Atom, error)

func (*Instance) CreateAtomFromOCIBlob

func (atomfs *Instance) CreateAtomFromOCIBlob(blob *casext.Blob) (types.Atom, error)

func (*Instance) CreateMolecule

func (atomfs *Instance) CreateMolecule(name string, atoms []types.Atom) (types.Molecule, error)

func (*Instance) CreateMoleculeFromOCITag

func (atomfs *Instance) CreateMoleculeFromOCITag(oci casext.Engine, name string) (types.Molecule, error)

func (*Instance) DeleteMolecule

func (atomfs *Instance) DeleteMolecule(name string) error

func (*Instance) DumpDB

func (atomfs *Instance) DumpDB() io.ReadCloser

DumpDB() dumps the underlying sqlite3 db for inspection.

func (*Instance) FSCK

func (atomfs *Instance) FSCK() ([]string, error)

FSCK does a filesystem check on this atomfs instance, returning any errors.

func (*Instance) GC

func (atomfs *Instance) GC(dryRun bool) error

GC does a garbage collection of atomfs, deleting any unused atoms, and any files in the atom directory that aren't in the database.

func (*Instance) GetAtoms

func (atomfs *Instance) GetAtoms() ([]types.Atom, error)

func (*Instance) GetAtomsByHash

func (atomfs *Instance) GetAtomsByHash() (map[string]types.Atom, error)

func (*Instance) GetMolecule

func (atomfs *Instance) GetMolecule(name string) (types.Molecule, error)

func (*Instance) Mount

func (atomfs *Instance) Mount(molecule string, target string, writable bool) error

func (*Instance) RenameMolecule

func (atomfs *Instance) RenameMolecule(old, new_ string) error

func (*Instance) SlurpOCI

func (atomfs *Instance) SlurpOCI(location string) error

func (*Instance) Umount

func (atomfs *Instance) Umount(target string) error

type MountOCIOpts

type MountOCIOpts struct {
	OCIDir       string
	MetadataPath string
	Tag          string
	Target       string
	Writable     bool
}

func (MountOCIOpts) AtomsPath

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

func (MountOCIOpts) MountedAtomsPath

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

func (MountOCIOpts) OverlayDirsPath

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

Directories

Path Synopsis
To avoid circular imports between db/mount/etc.
To avoid circular imports between db/mount/etc.

Jump to

Keyboard shortcuts

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