aufs

package
v1.12.13 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAufsNotSupported is returned if aufs is not supported by the host.
	ErrAufsNotSupported = fmt.Errorf("AUFS was not found in /proc/filesystems")
	// ErrAufsNested means aufs cannot be used bc we are in a user namespace
	ErrAufsNested = fmt.Errorf("AUFS cannot be used in non-init user namespace")
)

Functions

func Init

func Init(home string, options graphdriver.Options) (graphdriver.Driver, error)

Init returns a new AUFS driver. An error is returned if AUFS is not supported.

func Unmount

func Unmount(target string) error

Unmount the target specified.

Types

type Driver

type Driver struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Driver contains information about the filesystem mounted.

func (*Driver) AdditionalImageStores

func (a *Driver) AdditionalImageStores() []string

AdditionalImageStores returns additional image stores supported by the driver

func (*Driver) ApplyDiff

func (a *Driver) ApplyDiff(id string, idMappings *idtools.IDMappings, parent, mountLabel string, diff io.Reader) (size int64, err error)

ApplyDiff extracts the changeset from the given diff into the layer with the specified id and parent, returning the size of the new layer in bytes.

func (*Driver) Changes

func (a *Driver) Changes(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) ([]archive.Change, error)

Changes produces a list of changes between the specified layer and its parent layer. If parent is "", then all changes will be ADD changes.

func (*Driver) Cleanup

func (a *Driver) Cleanup() error

Cleanup aufs and unmount all mountpoints

func (*Driver) Create

func (a *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error

Create three folders for each id mnt, layers, and diff

func (*Driver) CreateFromTemplate

func (a *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, parentIDMappings *idtools.IDMappings, opts *graphdriver.CreateOpts, readWrite bool) error

CreateFromTemplate creates a layer with the same contents and parent as another layer.

func (*Driver) CreateReadWrite

func (a *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts) error

CreateReadWrite creates a layer that is writable for use as a container file system.

func (*Driver) Diff

func (a *Driver) Diff(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (io.ReadCloser, error)

Diff produces an archive of the changes between the specified layer and its parent layer which may be "".

func (*Driver) DiffGetter

func (a *Driver) DiffGetter(id string) (graphdriver.FileGetCloser, error)

DiffGetter returns a FileGetCloser that can read files from the directory that contains files for the layer differences. Used for direct access for tar-split.

func (*Driver) DiffSize

func (a *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error)

DiffSize calculates the changes between the specified id and its parent and returns the size in bytes of the changes relative to its base filesystem directory.

func (*Driver) Exists

func (a *Driver) Exists(id string) bool

Exists returns true if the given id is registered with this driver

func (*Driver) Get

func (a *Driver) Get(id string, options graphdriver.MountOpts) (string, error)

Get returns the rootfs path for the id. This will mount the dir at its given path

func (*Driver) Metadata

func (a *Driver) Metadata(id string) (map[string]string, error)

Metadata not implemented

func (*Driver) Put

func (a *Driver) Put(id string) error

Put unmounts and updates list of active mounts.

func (*Driver) Remove

func (a *Driver) Remove(id string) error

Remove will unmount and remove the given id.

func (*Driver) Status

func (a *Driver) Status() [][2]string

Status returns current information about the filesystem such as root directory, number of directories mounted, etc.

func (*Driver) String

func (*Driver) String() string

func (*Driver) SupportsShifting

func (a *Driver) SupportsShifting() bool

SupportsShifting tells whether the driver support shifting of the UIDs/GIDs in an userNS

func (*Driver) UpdateLayerIDMap

func (a *Driver) UpdateLayerIDMap(id string, toContainer, toHost *idtools.IDMappings, mountLabel string) error

UpdateLayerIDMap updates ID mappings in a layer from matching the ones specified by toContainer to those specified by toHost.

Jump to

Keyboard shortcuts

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