From 91154e9235c71bc120b93d2e16632970e0f0ce0e Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 23 Dec 2015 13:43:34 -0500 Subject: [PATCH] Move graph driver registration out of the daemon package. Signed-off-by: Daniel Nephin --- daemon/daemon.go | 3 ++- .../register/register_aufs.go} | 2 +- .../register/register_btrfs.go} | 2 +- .../register/register_devicemapper.go} | 2 +- .../register/register_overlay.go} | 2 +- daemon/graphdriver/register/register_vfs.go | 6 ++++++ daemon/graphdriver/register/register_windows.go | 6 ++++++ .../{daemon_zfs.go => graphdriver/register/register_zfs.go} | 2 +- 8 files changed, 19 insertions(+), 6 deletions(-) rename daemon/{daemon_aufs.go => graphdriver/register/register_aufs.go} (89%) rename daemon/{daemon_btrfs.go => graphdriver/register/register_btrfs.go} (89%) rename daemon/{daemon_devicemapper.go => graphdriver/register/register_devicemapper.go} (90%) rename daemon/{daemon_overlay.go => graphdriver/register/register_overlay.go} (89%) create mode 100644 daemon/graphdriver/register/register_vfs.go create mode 100644 daemon/graphdriver/register/register_windows.go rename daemon/{daemon_zfs.go => graphdriver/register/register_zfs.go} (90%) diff --git a/daemon/daemon.go b/daemon/daemon.go index 2fba5ba2d6..0f47e74174 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -30,7 +30,8 @@ import ( "github.com/docker/docker/daemon/exec" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daemon/execdriver/execdrivers" - _ "github.com/docker/docker/daemon/graphdriver/vfs" // register vfs + // register graph drivers + _ "github.com/docker/docker/daemon/graphdriver/register" "github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/network" "github.com/docker/docker/distribution" diff --git a/daemon/daemon_aufs.go b/daemon/graphdriver/register/register_aufs.go similarity index 89% rename from daemon/daemon_aufs.go rename to daemon/graphdriver/register/register_aufs.go index 151d0b1bf1..262954d6e3 100644 --- a/daemon/daemon_aufs.go +++ b/daemon/graphdriver/register/register_aufs.go @@ -1,6 +1,6 @@ // +build !exclude_graphdriver_aufs,linux -package daemon +package register import ( // register the aufs graphdriver diff --git a/daemon/daemon_btrfs.go b/daemon/graphdriver/register/register_btrfs.go similarity index 89% rename from daemon/daemon_btrfs.go rename to daemon/graphdriver/register/register_btrfs.go index b15b37b9af..f456cc5ce5 100644 --- a/daemon/daemon_btrfs.go +++ b/daemon/graphdriver/register/register_btrfs.go @@ -1,6 +1,6 @@ // +build !exclude_graphdriver_btrfs,linux -package daemon +package register import ( // register the btrfs graphdriver diff --git a/daemon/daemon_devicemapper.go b/daemon/graphdriver/register/register_devicemapper.go similarity index 90% rename from daemon/daemon_devicemapper.go rename to daemon/graphdriver/register/register_devicemapper.go index b33b01a5f3..bb2e9ef541 100644 --- a/daemon/daemon_devicemapper.go +++ b/daemon/graphdriver/register/register_devicemapper.go @@ -1,6 +1,6 @@ // +build !exclude_graphdriver_devicemapper,linux -package daemon +package register import ( // register the devmapper graphdriver diff --git a/daemon/daemon_overlay.go b/daemon/graphdriver/register/register_overlay.go similarity index 89% rename from daemon/daemon_overlay.go rename to daemon/graphdriver/register/register_overlay.go index 3c97db13a4..3a9526420f 100644 --- a/daemon/daemon_overlay.go +++ b/daemon/graphdriver/register/register_overlay.go @@ -1,6 +1,6 @@ // +build !exclude_graphdriver_overlay,linux -package daemon +package register import ( // register the overlay graphdriver diff --git a/daemon/graphdriver/register/register_vfs.go b/daemon/graphdriver/register/register_vfs.go new file mode 100644 index 0000000000..98fad23b20 --- /dev/null +++ b/daemon/graphdriver/register/register_vfs.go @@ -0,0 +1,6 @@ +package register + +import ( + // register vfs + _ "github.com/docker/docker/daemon/graphdriver/vfs" +) diff --git a/daemon/graphdriver/register/register_windows.go b/daemon/graphdriver/register/register_windows.go new file mode 100644 index 0000000000..efaa5005ed --- /dev/null +++ b/daemon/graphdriver/register/register_windows.go @@ -0,0 +1,6 @@ +package register + +import ( + // register the windows graph driver + _ "github.com/docker/docker/daemon/graphdriver/windows" +) diff --git a/daemon/daemon_zfs.go b/daemon/graphdriver/register/register_zfs.go similarity index 90% rename from daemon/daemon_zfs.go rename to daemon/graphdriver/register/register_zfs.go index e5b4dce9cc..8c31c415f4 100644 --- a/daemon/daemon_zfs.go +++ b/daemon/graphdriver/register/register_zfs.go @@ -1,6 +1,6 @@ // +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd -package daemon +package register import ( // register the zfs driver