Refactor use of graphdriver.Differ

Some graphdrivers are Differs and type assertions are made
in various places throughout the project. Differ offers some
convenience in generating/applying diffs of filesystem layers
but for most graphdrivers another code path is taken.

This patch brings all of the logic related to filesystem
diffs in one place, and simplifies the implementation of some
common types like Image, Daemon, and Container.

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
Upstream-commit: dee6b481fe0da1d845261ffff2e610fb05898d3c
Component: engine
This commit is contained in:
Josh Hawn
2014-09-10 20:30:52 -07:00
parent 9c843f0293
commit 861f46b221
12 changed files with 263 additions and 191 deletions

View File

@ -43,7 +43,7 @@ func Init(home string, options []string) (graphdriver.Driver, error) {
home: home,
}
return d, nil
return graphdriver.NewGenericDriverWrapper(d), nil
}
func (d *Driver) String() string {