Documentation ¶
Index ¶
- Variables
- func Init(home string, options context.Options) (context.Driver, error)
- func Unmount(target string) error
- type Driver
- func (a *Driver) AdditionalImageStores() []string
- func (a *Driver) ApplyDiff(id, parent string, options context.ApplyDiffOpts) (size int64, err error)
- func (a *Driver) Changes(id string, idMappings *idtools.IDMappings, parent string, ...) ([]archive.Change, error)
- func (a *Driver) Cleanup() error
- func (a *Driver) Create(id, parent string, opts *context.CreateOpts) error
- func (a *Driver) CreateFromTemplate(id, template string, templateIDMappings *idtools.IDMappings, parent string, ...) error
- func (a *Driver) CreateReadWrite(id, parent string, opts *context.CreateOpts) error
- func (a *Driver) Diff(id string, idMappings *idtools.IDMappings, parent string, ...) (io.ReadCloser, error)
- func (a *Driver) DiffGetter(id string) (context.FileGetCloser, error)
- func (a *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, ...) (size int64, err error)
- func (a *Driver) Exists(id string) bool
- func (a *Driver) Get(id string, options context.MountOpts) (string, error)
- func (a *Driver) Metadata(id string) (map[string]string, error)
- func (a *Driver) Put(id string) error
- func (a *Driver) ReadWriteDiskUsage(id string) (*directory.DiskUsage, error)
- func (a *Driver) Remove(id string) error
- func (a *Driver) Status() [][2]string
- func (*Driver) String() string
- func (a *Driver) SupportsShifting() bool
- func (a *Driver) UpdateLayerIDMap(id string, toContainer, toHost *idtools.IDMappings, mountLabel string) error
Constants ¶
This section is empty.
Variables ¶
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 ¶
Types ¶
type Driver ¶
Driver contains information about the filesystem mounted.
func (*Driver) AdditionalImageStores ¶
AdditionalImageStores returns additional image stores supported by the driver
func (*Driver) ApplyDiff ¶
func (a *Driver) ApplyDiff(id, parent string, options context.ApplyDiffOpts) (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) Create ¶
func (a *Driver) Create(id, parent string, opts *context.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 *context.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 *context.CreateOpts) error
CreateReadWrite creates a layer that is writable for use as a container file constants.
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) (context.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) Get ¶
Get returns the rootfs path for the id. This will mount the dir at its given path
func (*Driver) ReadWriteDiskUsage ¶
ReadWriteDiskUsage returns the disk usage of the writable directory for the ID. For AUFS, it queries the mountpoint for this ID.
func (*Driver) Status ¶
Status returns current information about the filesystem such as root directory, number of directories mounted, etc.
func (*Driver) SupportsShifting ¶
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.