Documentation ¶
Index ¶
- Constants
- Variables
- func Init(root string, options []string) (graphdriver.Driver, error)
- func Unmount(target string) error
- type Driver
- func (a *Driver) ApplyDiff(id, parent string, diff archive.ArchiveReader) (size int64, err error)
- func (a *Driver) Changes(id, parent string) ([]archive.Change, error)
- func (a *Driver) Cleanup() error
- func (a *Driver) Create(id, parent string) error
- func (a *Driver) Diff(id, parent string) (archive.Archive, error)
- func (a *Driver) DiffSize(id, parent string) (size int64, err error)
- func (a *Driver) Exists(id string) bool
- func (a *Driver) Get(id, mountLabel string) (string, error)
- func (a *Driver) Migrate(pth string, setupInit func(p string) error) error
- func (a *Driver) Put(id string)
- func (a *Driver) Remove(id string) error
- func (a *Driver) Status() [][2]string
- func (*Driver) String() string
Constants ¶
const MsRemount = syscall.MS_REMOUNT
Variables ¶
var (
ErrAufsNotSupported = fmt.Errorf("AUFS was not found in /proc/filesystems")
)
Functions ¶
Types ¶
type Driver ¶
type Driver struct { sync.Mutex // Protects concurrent modification to active // contains filtered or unexported fields }
func (*Driver) ApplyDiff ¶
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 ¶
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) Diff ¶
Diff produces an archive of the changes between the specified layer and its parent layer which may be "".
func (*Driver) DiffSize ¶
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) Migrate ¶
Migrate existing images and containers from docker < 0.7.x
The format pre 0.7 is for docker to store the metadata and filesystem content in the same directory. For the migration to work we need to move Image layer data from /var/lib/docker/graph/<id>/layers to the diff of the registered id.
Next we need to migrate the container's rw layer to diff of the driver. After the contents are migrated we need to register the image and container ids with the driver.
For the migration we try to move the folder containing the layer files, if that fails because the data is currently mounted we will fallback to creating a symlink.