From 5074547b1ffe15f0f4c75ddfcc4e6bd64c039028 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Tue, 17 Apr 2018 17:26:28 +0800 Subject: [PATCH] refactor: move pkg to correct places Signed-off-by: Allen Sun --- Makefile | 6 +++--- {pkg => apis}/opts/cpu.go | 0 {pkg => apis}/opts/devicemappings.go | 0 {pkg => apis}/opts/devicemappings_test.go | 0 {pkg => apis}/opts/diskquota.go | 0 {pkg => apis}/opts/diskquota_test.go | 0 {pkg => apis}/opts/intel_rdt.go | 0 {pkg => apis}/opts/intel_rdt_test.go | 0 {pkg => apis}/opts/labels.go | 0 {pkg => apis}/opts/labels_test.go | 0 {pkg => apis}/opts/memory.go | 0 {pkg => apis}/opts/memory_swap.go | 0 {pkg => apis}/opts/memory_swap_test.go | 0 {pkg => apis}/opts/memory_swappiness.go | 0 {pkg => apis}/opts/memory_swappiness_test.go | 0 {pkg => apis}/opts/memory_test.go | 0 {pkg => apis}/opts/mountpoint.go | 0 {pkg => apis}/opts/mountpoint_test.go | 0 {pkg => apis}/opts/networks.go | 0 {pkg => apis}/opts/networks_test.go | 0 {pkg => apis}/opts/oom_score.go | 0 {pkg => apis}/opts/portbindings.go | 0 {pkg => apis}/opts/portbindings_test.go | 0 {pkg => apis}/opts/ports.go | 0 {pkg => apis}/opts/ports_test.go | 0 {pkg => apis}/opts/restart_policy.go | 0 {pkg => apis}/opts/restart_policy_test.go | 0 {pkg => apis}/opts/spec_annotation.go | 0 {pkg => apis}/opts/spec_annotation_test.go | 0 {pkg => apis}/opts/sysctl.go | 0 {pkg => apis}/opts/sysctl_test.go | 0 cli/container.go | 2 +- cli/update.go | 2 +- daemon/config/config.go | 2 +- daemon/mgr/container.go | 4 ++-- daemon/mgr/spec_blkio.go | 2 +- daemon/mgr/spec_devices.go | 2 +- daemon/mgr/volume.go | 4 ++-- hack/module | 4 ++-- hack/package/deb/Makefile | 6 +++--- main.go | 2 +- {pkg => storage/controlserver}/client/client.go | 0 {pkg => storage/controlserver}/client/errors.go | 0 {pkg => storage/controlserver}/client/httpcli.go | 0 {pkg => storage/controlserver}/client/httpcli_test.go | 0 {pkg => storage/controlserver}/client/url.go | 0 {pkg => storage/controlserver}/client/url_test.go | 0 {pkg => storage}/quota/grpquota.go | 0 {pkg => storage}/quota/prjquota.go | 0 {pkg => storage}/quota/quota.go | 0 {pkg => storage}/quota/set_diskquota.go | 0 {pkg => storage}/quota/type.go | 0 {volume => storage/volume}/README.md | 0 {volume => storage/volume}/config.go | 0 {volume => storage/volume}/core.go | 10 +++++----- {volume => storage/volume}/core_util.go | 10 +++++----- {volume => storage/volume}/driver/context.go | 0 {volume => storage/volume}/driver/driver.go | 2 +- {volume => storage/volume}/driver/driver_interface.go | 2 +- {volume => storage/volume}/error/errors.go | 0 {volume => storage/volume}/examples/demo/demo.go | 4 ++-- {volume => storage/volume}/modules/ceph/ceph.go | 6 +++--- {volume => storage/volume}/modules/ceph/map.go | 4 ++-- {volume => storage/volume}/modules/ceph/types.go | 0 {volume => storage/volume}/modules/local/local.go | 6 +++--- {volume => storage/volume}/modules/tmpfs/tmpfs.go | 4 ++-- {volume => storage/volume}/types/meta/convert.go | 0 {volume => storage/volume}/types/meta/meta.go | 0 {volume => storage/volume}/types/meta/types.go | 0 {volume => storage/volume}/types/selector.go | 0 {volume => storage/volume}/types/storage.go | 2 +- {volume => storage/volume}/types/types.go | 0 {volume => storage/volume}/types/volume.go | 2 +- {volume => storage/volume}/vars.go | 2 +- 74 files changed, 45 insertions(+), 45 deletions(-) rename {pkg => apis}/opts/cpu.go (100%) rename {pkg => apis}/opts/devicemappings.go (100%) rename {pkg => apis}/opts/devicemappings_test.go (100%) rename {pkg => apis}/opts/diskquota.go (100%) rename {pkg => apis}/opts/diskquota_test.go (100%) rename {pkg => apis}/opts/intel_rdt.go (100%) rename {pkg => apis}/opts/intel_rdt_test.go (100%) rename {pkg => apis}/opts/labels.go (100%) rename {pkg => apis}/opts/labels_test.go (100%) rename {pkg => apis}/opts/memory.go (100%) rename {pkg => apis}/opts/memory_swap.go (100%) rename {pkg => apis}/opts/memory_swap_test.go (100%) rename {pkg => apis}/opts/memory_swappiness.go (100%) rename {pkg => apis}/opts/memory_swappiness_test.go (100%) rename {pkg => apis}/opts/memory_test.go (100%) rename {pkg => apis}/opts/mountpoint.go (100%) rename {pkg => apis}/opts/mountpoint_test.go (100%) rename {pkg => apis}/opts/networks.go (100%) rename {pkg => apis}/opts/networks_test.go (100%) rename {pkg => apis}/opts/oom_score.go (100%) rename {pkg => apis}/opts/portbindings.go (100%) rename {pkg => apis}/opts/portbindings_test.go (100%) rename {pkg => apis}/opts/ports.go (100%) rename {pkg => apis}/opts/ports_test.go (100%) rename {pkg => apis}/opts/restart_policy.go (100%) rename {pkg => apis}/opts/restart_policy_test.go (100%) rename {pkg => apis}/opts/spec_annotation.go (100%) rename {pkg => apis}/opts/spec_annotation_test.go (100%) rename {pkg => apis}/opts/sysctl.go (100%) rename {pkg => apis}/opts/sysctl_test.go (100%) rename {pkg => storage/controlserver}/client/client.go (100%) rename {pkg => storage/controlserver}/client/errors.go (100%) rename {pkg => storage/controlserver}/client/httpcli.go (100%) rename {pkg => storage/controlserver}/client/httpcli_test.go (100%) rename {pkg => storage/controlserver}/client/url.go (100%) rename {pkg => storage/controlserver}/client/url_test.go (100%) rename {pkg => storage}/quota/grpquota.go (100%) rename {pkg => storage}/quota/prjquota.go (100%) rename {pkg => storage}/quota/quota.go (100%) rename {pkg => storage}/quota/set_diskquota.go (100%) rename {pkg => storage}/quota/type.go (100%) rename {volume => storage/volume}/README.md (100%) rename {volume => storage/volume}/config.go (100%) rename {volume => storage/volume}/core.go (97%) rename {volume => storage/volume}/core_util.go (96%) rename {volume => storage/volume}/driver/context.go (100%) rename {volume => storage/volume}/driver/driver.go (98%) rename {volume => storage/volume}/driver/driver_interface.go (96%) rename {volume => storage/volume}/error/errors.go (100%) rename {volume => storage/volume}/examples/demo/demo.go (90%) rename {volume => storage/volume}/modules/ceph/ceph.go (98%) rename {volume => storage/volume}/modules/ceph/map.go (97%) rename {volume => storage/volume}/modules/ceph/types.go (100%) rename {volume => storage/volume}/modules/local/local.go (95%) rename {volume => storage/volume}/modules/tmpfs/tmpfs.go (97%) rename {volume => storage/volume}/types/meta/convert.go (100%) rename {volume => storage/volume}/types/meta/meta.go (100%) rename {volume => storage/volume}/types/meta/types.go (100%) rename {volume => storage/volume}/types/selector.go (100%) rename {volume => storage/volume}/types/storage.go (98%) rename {volume => storage/volume}/types/types.go (100%) rename {volume => storage/volume}/types/volume.go (99%) rename {volume => storage/volume}/vars.go (95%) diff --git a/Makefile b/Makefile index 1cf87185e..12a486338 100644 --- a/Makefile +++ b/Makefile @@ -72,9 +72,9 @@ validate-swagger: ## run swagger validate .PHONY: modules modules: @./hack/module --clean - @./hack/module --add-volume=github.com/alibaba/pouch/volume/modules/ceph - @./hack/module --add-volume=github.com/alibaba/pouch/volume/modules/tmpfs - @./hack/module --add-volume=github.com/alibaba/pouch/volume/modules/local + @./hack/module --add-volume=github.com/alibaba/pouch/storage/volume/modules/ceph + @./hack/module --add-volume=github.com/alibaba/pouch/storage/volume/modules/tmpfs + @./hack/module --add-volume=github.com/alibaba/pouch/storage/volume/modules/local # build binaries # install them to /usr/local/bin/ diff --git a/pkg/opts/cpu.go b/apis/opts/cpu.go similarity index 100% rename from pkg/opts/cpu.go rename to apis/opts/cpu.go diff --git a/pkg/opts/devicemappings.go b/apis/opts/devicemappings.go similarity index 100% rename from pkg/opts/devicemappings.go rename to apis/opts/devicemappings.go diff --git a/pkg/opts/devicemappings_test.go b/apis/opts/devicemappings_test.go similarity index 100% rename from pkg/opts/devicemappings_test.go rename to apis/opts/devicemappings_test.go diff --git a/pkg/opts/diskquota.go b/apis/opts/diskquota.go similarity index 100% rename from pkg/opts/diskquota.go rename to apis/opts/diskquota.go diff --git a/pkg/opts/diskquota_test.go b/apis/opts/diskquota_test.go similarity index 100% rename from pkg/opts/diskquota_test.go rename to apis/opts/diskquota_test.go diff --git a/pkg/opts/intel_rdt.go b/apis/opts/intel_rdt.go similarity index 100% rename from pkg/opts/intel_rdt.go rename to apis/opts/intel_rdt.go diff --git a/pkg/opts/intel_rdt_test.go b/apis/opts/intel_rdt_test.go similarity index 100% rename from pkg/opts/intel_rdt_test.go rename to apis/opts/intel_rdt_test.go diff --git a/pkg/opts/labels.go b/apis/opts/labels.go similarity index 100% rename from pkg/opts/labels.go rename to apis/opts/labels.go diff --git a/pkg/opts/labels_test.go b/apis/opts/labels_test.go similarity index 100% rename from pkg/opts/labels_test.go rename to apis/opts/labels_test.go diff --git a/pkg/opts/memory.go b/apis/opts/memory.go similarity index 100% rename from pkg/opts/memory.go rename to apis/opts/memory.go diff --git a/pkg/opts/memory_swap.go b/apis/opts/memory_swap.go similarity index 100% rename from pkg/opts/memory_swap.go rename to apis/opts/memory_swap.go diff --git a/pkg/opts/memory_swap_test.go b/apis/opts/memory_swap_test.go similarity index 100% rename from pkg/opts/memory_swap_test.go rename to apis/opts/memory_swap_test.go diff --git a/pkg/opts/memory_swappiness.go b/apis/opts/memory_swappiness.go similarity index 100% rename from pkg/opts/memory_swappiness.go rename to apis/opts/memory_swappiness.go diff --git a/pkg/opts/memory_swappiness_test.go b/apis/opts/memory_swappiness_test.go similarity index 100% rename from pkg/opts/memory_swappiness_test.go rename to apis/opts/memory_swappiness_test.go diff --git a/pkg/opts/memory_test.go b/apis/opts/memory_test.go similarity index 100% rename from pkg/opts/memory_test.go rename to apis/opts/memory_test.go diff --git a/pkg/opts/mountpoint.go b/apis/opts/mountpoint.go similarity index 100% rename from pkg/opts/mountpoint.go rename to apis/opts/mountpoint.go diff --git a/pkg/opts/mountpoint_test.go b/apis/opts/mountpoint_test.go similarity index 100% rename from pkg/opts/mountpoint_test.go rename to apis/opts/mountpoint_test.go diff --git a/pkg/opts/networks.go b/apis/opts/networks.go similarity index 100% rename from pkg/opts/networks.go rename to apis/opts/networks.go diff --git a/pkg/opts/networks_test.go b/apis/opts/networks_test.go similarity index 100% rename from pkg/opts/networks_test.go rename to apis/opts/networks_test.go diff --git a/pkg/opts/oom_score.go b/apis/opts/oom_score.go similarity index 100% rename from pkg/opts/oom_score.go rename to apis/opts/oom_score.go diff --git a/pkg/opts/portbindings.go b/apis/opts/portbindings.go similarity index 100% rename from pkg/opts/portbindings.go rename to apis/opts/portbindings.go diff --git a/pkg/opts/portbindings_test.go b/apis/opts/portbindings_test.go similarity index 100% rename from pkg/opts/portbindings_test.go rename to apis/opts/portbindings_test.go diff --git a/pkg/opts/ports.go b/apis/opts/ports.go similarity index 100% rename from pkg/opts/ports.go rename to apis/opts/ports.go diff --git a/pkg/opts/ports_test.go b/apis/opts/ports_test.go similarity index 100% rename from pkg/opts/ports_test.go rename to apis/opts/ports_test.go diff --git a/pkg/opts/restart_policy.go b/apis/opts/restart_policy.go similarity index 100% rename from pkg/opts/restart_policy.go rename to apis/opts/restart_policy.go diff --git a/pkg/opts/restart_policy_test.go b/apis/opts/restart_policy_test.go similarity index 100% rename from pkg/opts/restart_policy_test.go rename to apis/opts/restart_policy_test.go diff --git a/pkg/opts/spec_annotation.go b/apis/opts/spec_annotation.go similarity index 100% rename from pkg/opts/spec_annotation.go rename to apis/opts/spec_annotation.go diff --git a/pkg/opts/spec_annotation_test.go b/apis/opts/spec_annotation_test.go similarity index 100% rename from pkg/opts/spec_annotation_test.go rename to apis/opts/spec_annotation_test.go diff --git a/pkg/opts/sysctl.go b/apis/opts/sysctl.go similarity index 100% rename from pkg/opts/sysctl.go rename to apis/opts/sysctl.go diff --git a/pkg/opts/sysctl_test.go b/apis/opts/sysctl_test.go similarity index 100% rename from pkg/opts/sysctl_test.go rename to apis/opts/sysctl_test.go diff --git a/cli/container.go b/cli/container.go index e84805cde..35509d1b4 100644 --- a/cli/container.go +++ b/cli/container.go @@ -3,8 +3,8 @@ package main import ( "strings" + "github.com/alibaba/pouch/apis/opts" "github.com/alibaba/pouch/apis/types" - "github.com/alibaba/pouch/pkg/opts" strfmt "github.com/go-openapi/strfmt" ) diff --git a/cli/update.go b/cli/update.go index 65a02b218..62eed4ead 100644 --- a/cli/update.go +++ b/cli/update.go @@ -3,8 +3,8 @@ package main import ( "context" + "github.com/alibaba/pouch/apis/opts" "github.com/alibaba/pouch/apis/types" - "github.com/alibaba/pouch/pkg/opts" "github.com/alibaba/pouch/pkg/reference" "github.com/spf13/cobra" diff --git a/daemon/config/config.go b/daemon/config/config.go index 296aa45f8..4868bc447 100644 --- a/daemon/config/config.go +++ b/daemon/config/config.go @@ -9,7 +9,7 @@ import ( "github.com/alibaba/pouch/cri" "github.com/alibaba/pouch/network" "github.com/alibaba/pouch/pkg/utils" - "github.com/alibaba/pouch/volume" + "github.com/alibaba/pouch/storage/volume" ) // Config refers to daemon's whole configurations. diff --git a/daemon/mgr/container.go b/daemon/mgr/container.go index d6316df19..67646c080 100644 --- a/daemon/mgr/container.go +++ b/daemon/mgr/container.go @@ -12,6 +12,7 @@ import ( "strings" "time" + "github.com/alibaba/pouch/apis/opts" "github.com/alibaba/pouch/apis/plugins" "github.com/alibaba/pouch/apis/types" "github.com/alibaba/pouch/ctrd" @@ -22,11 +23,10 @@ import ( "github.com/alibaba/pouch/pkg/collect" "github.com/alibaba/pouch/pkg/errtypes" "github.com/alibaba/pouch/pkg/meta" - "github.com/alibaba/pouch/pkg/opts" - "github.com/alibaba/pouch/pkg/quota" "github.com/alibaba/pouch/pkg/randomid" "github.com/alibaba/pouch/pkg/reference" "github.com/alibaba/pouch/pkg/utils" + "github.com/alibaba/pouch/storage/quota" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/namespaces" diff --git a/daemon/mgr/spec_blkio.go b/daemon/mgr/spec_blkio.go index 76ac252fb..2735ebcc6 100644 --- a/daemon/mgr/spec_blkio.go +++ b/daemon/mgr/spec_blkio.go @@ -8,7 +8,7 @@ import ( "syscall" "github.com/alibaba/pouch/apis/types" - "github.com/alibaba/pouch/pkg/quota" + "github.com/alibaba/pouch/storage/quota" specs "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/daemon/mgr/spec_devices.go b/daemon/mgr/spec_devices.go index e26c1fb43..67ea75d32 100644 --- a/daemon/mgr/spec_devices.go +++ b/daemon/mgr/spec_devices.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/alibaba/pouch/pkg/opts" + "github.com/alibaba/pouch/apis/opts" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/devices" diff --git a/daemon/mgr/volume.go b/daemon/mgr/volume.go index 016e0f9ad..db8026b40 100644 --- a/daemon/mgr/volume.go +++ b/daemon/mgr/volume.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/alibaba/pouch/pkg/errtypes" - "github.com/alibaba/pouch/volume" - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume" + "github.com/alibaba/pouch/storage/volume/types" "github.com/pkg/errors" ) diff --git a/hack/module b/hack/module index 0dd1c5975..3d8ce4ee2 100755 --- a/hack/module +++ b/hack/module @@ -68,8 +68,8 @@ if [ "$help" = "yes" ]; then echo "" echo " ./module To comiple directly on current codes, include added modules" echo "" - echo " ./module --add-volume=github.com/alibaba/pouch/volume/examples/demo" - echo " A example show how to add a driver module, 'github.com/alibaba/pouch/volume/examples/demo' is a Go's package" + echo " ./module --add-volume=github.com/alibaba/pouch/storage/volume/examples/demo" + echo " A example show how to add a driver module, 'github.com/alibaba/pouch/storage/volume/examples/demo' is a Go's package" echo " can be found in \$GOPATH" exit 0 fi diff --git a/hack/package/deb/Makefile b/hack/package/deb/Makefile index 751008d2c..e1375c0bc 100644 --- a/hack/package/deb/Makefile +++ b/hack/package/deb/Makefile @@ -38,9 +38,9 @@ clean: #.PHONY: modules modules: - @./hack/module --add-volume=github.com/alibaba/pouch/volume/modules/ceph - @./hack/module --add-volume=github.com/alibaba/pouch/volume/modules/tmpfs - @./hack/module --add-volume=github.com/alibaba/pouch/volume/modules/local + @./hack/module --add-volume=github.com/alibaba/pouch/storage/volume/modules/ceph + @./hack/module --add-volume=github.com/alibaba/pouch/storage/volume/modules/tmpfs + @./hack/module --add-volume=github.com/alibaba/pouch/storage/volume/modules/local # install binaries .PHONY: install diff --git a/main.go b/main.go index 045a3f144..5caa7b166 100644 --- a/main.go +++ b/main.go @@ -17,8 +17,8 @@ import ( "github.com/alibaba/pouch/lxcfs" "github.com/alibaba/pouch/pkg/debug" "github.com/alibaba/pouch/pkg/exec" - "github.com/alibaba/pouch/pkg/quota" "github.com/alibaba/pouch/pkg/utils" + "github.com/alibaba/pouch/storage/quota" "github.com/alibaba/pouch/version" "github.com/docker/docker/pkg/reexec" diff --git a/pkg/client/client.go b/storage/controlserver/client/client.go similarity index 100% rename from pkg/client/client.go rename to storage/controlserver/client/client.go diff --git a/pkg/client/errors.go b/storage/controlserver/client/errors.go similarity index 100% rename from pkg/client/errors.go rename to storage/controlserver/client/errors.go diff --git a/pkg/client/httpcli.go b/storage/controlserver/client/httpcli.go similarity index 100% rename from pkg/client/httpcli.go rename to storage/controlserver/client/httpcli.go diff --git a/pkg/client/httpcli_test.go b/storage/controlserver/client/httpcli_test.go similarity index 100% rename from pkg/client/httpcli_test.go rename to storage/controlserver/client/httpcli_test.go diff --git a/pkg/client/url.go b/storage/controlserver/client/url.go similarity index 100% rename from pkg/client/url.go rename to storage/controlserver/client/url.go diff --git a/pkg/client/url_test.go b/storage/controlserver/client/url_test.go similarity index 100% rename from pkg/client/url_test.go rename to storage/controlserver/client/url_test.go diff --git a/pkg/quota/grpquota.go b/storage/quota/grpquota.go similarity index 100% rename from pkg/quota/grpquota.go rename to storage/quota/grpquota.go diff --git a/pkg/quota/prjquota.go b/storage/quota/prjquota.go similarity index 100% rename from pkg/quota/prjquota.go rename to storage/quota/prjquota.go diff --git a/pkg/quota/quota.go b/storage/quota/quota.go similarity index 100% rename from pkg/quota/quota.go rename to storage/quota/quota.go diff --git a/pkg/quota/set_diskquota.go b/storage/quota/set_diskquota.go similarity index 100% rename from pkg/quota/set_diskquota.go rename to storage/quota/set_diskquota.go diff --git a/pkg/quota/type.go b/storage/quota/type.go similarity index 100% rename from pkg/quota/type.go rename to storage/quota/type.go diff --git a/volume/README.md b/storage/volume/README.md similarity index 100% rename from volume/README.md rename to storage/volume/README.md diff --git a/volume/config.go b/storage/volume/config.go similarity index 100% rename from volume/config.go rename to storage/volume/config.go diff --git a/volume/core.go b/storage/volume/core.go similarity index 97% rename from volume/core.go rename to storage/volume/core.go index 0f8a7dd43..091875aa2 100644 --- a/volume/core.go +++ b/storage/volume/core.go @@ -4,12 +4,12 @@ import ( "fmt" "reflect" - "github.com/alibaba/pouch/pkg/client" metastore "github.com/alibaba/pouch/pkg/meta" - "github.com/alibaba/pouch/volume/driver" - volerr "github.com/alibaba/pouch/volume/error" - "github.com/alibaba/pouch/volume/types" - "github.com/alibaba/pouch/volume/types/meta" + "github.com/alibaba/pouch/storage/controlserver/client" + "github.com/alibaba/pouch/storage/volume/driver" + volerr "github.com/alibaba/pouch/storage/volume/error" + "github.com/alibaba/pouch/storage/volume/types" + "github.com/alibaba/pouch/storage/volume/types/meta" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/volume/core_util.go b/storage/volume/core_util.go similarity index 96% rename from volume/core_util.go rename to storage/volume/core_util.go index f39ab3176..252df2e2c 100644 --- a/volume/core_util.go +++ b/storage/volume/core_util.go @@ -9,11 +9,11 @@ import ( "time" "github.com/alibaba/pouch/pkg/bytefmt" - "github.com/alibaba/pouch/pkg/client" - "github.com/alibaba/pouch/volume/driver" - volerr "github.com/alibaba/pouch/volume/error" - "github.com/alibaba/pouch/volume/types" - "github.com/alibaba/pouch/volume/types/meta" + "github.com/alibaba/pouch/storage/controlserver/client" + "github.com/alibaba/pouch/storage/volume/driver" + volerr "github.com/alibaba/pouch/storage/volume/error" + "github.com/alibaba/pouch/storage/volume/types" + "github.com/alibaba/pouch/storage/volume/types/meta" "github.com/pborman/uuid" "github.com/pkg/errors" diff --git a/volume/driver/context.go b/storage/volume/driver/context.go similarity index 100% rename from volume/driver/context.go rename to storage/volume/driver/context.go diff --git a/volume/driver/driver.go b/storage/volume/driver/driver.go similarity index 98% rename from volume/driver/driver.go rename to storage/volume/driver/driver.go index 3ead7a6a6..23c1bd1a7 100644 --- a/volume/driver/driver.go +++ b/storage/volume/driver/driver.go @@ -3,7 +3,7 @@ package driver import ( "regexp" - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume/types" "github.com/pkg/errors" ) diff --git a/volume/driver/driver_interface.go b/storage/volume/driver/driver_interface.go similarity index 96% rename from volume/driver/driver_interface.go rename to storage/volume/driver/driver_interface.go index 8212e4efb..fe4cc0ed5 100644 --- a/volume/driver/driver_interface.go +++ b/storage/volume/driver/driver_interface.go @@ -1,7 +1,7 @@ package driver import ( - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume/types" ) // Driver represents volume driver base operation interface. diff --git a/volume/error/errors.go b/storage/volume/error/errors.go similarity index 100% rename from volume/error/errors.go rename to storage/volume/error/errors.go diff --git a/volume/examples/demo/demo.go b/storage/volume/examples/demo/demo.go similarity index 90% rename from volume/examples/demo/demo.go rename to storage/volume/examples/demo/demo.go index bf15138c2..2fe3bf29f 100644 --- a/volume/examples/demo/demo.go +++ b/storage/volume/examples/demo/demo.go @@ -3,8 +3,8 @@ package demo import ( "path" - "github.com/alibaba/pouch/volume/driver" - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume/driver" + "github.com/alibaba/pouch/storage/volume/types" ) func init() { diff --git a/volume/modules/ceph/ceph.go b/storage/volume/modules/ceph/ceph.go similarity index 98% rename from volume/modules/ceph/ceph.go rename to storage/volume/modules/ceph/ceph.go index 38c9f6fc5..9a2418ab4 100644 --- a/volume/modules/ceph/ceph.go +++ b/storage/volume/modules/ceph/ceph.go @@ -13,9 +13,9 @@ import ( "github.com/alibaba/pouch/pkg/exec" "github.com/alibaba/pouch/pkg/utils" - "github.com/alibaba/pouch/volume/driver" - "github.com/alibaba/pouch/volume/types" - "github.com/alibaba/pouch/volume/types/meta" + "github.com/alibaba/pouch/storage/volume/driver" + "github.com/alibaba/pouch/storage/volume/types" + "github.com/alibaba/pouch/storage/volume/types/meta" "github.com/go-ini/ini" ) diff --git a/volume/modules/ceph/map.go b/storage/volume/modules/ceph/map.go similarity index 97% rename from volume/modules/ceph/map.go rename to storage/volume/modules/ceph/map.go index 1fc7d4450..d4499aca5 100644 --- a/volume/modules/ceph/map.go +++ b/storage/volume/modules/ceph/map.go @@ -10,8 +10,8 @@ import ( "time" "github.com/alibaba/pouch/pkg/exec" - "github.com/alibaba/pouch/volume/driver" - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume/driver" + "github.com/alibaba/pouch/storage/volume/types" ) var ( diff --git a/volume/modules/ceph/types.go b/storage/volume/modules/ceph/types.go similarity index 100% rename from volume/modules/ceph/types.go rename to storage/volume/modules/ceph/types.go diff --git a/volume/modules/local/local.go b/storage/volume/modules/local/local.go similarity index 95% rename from volume/modules/local/local.go rename to storage/volume/modules/local/local.go index c0813b3a4..83c3dcaa8 100644 --- a/volume/modules/local/local.go +++ b/storage/volume/modules/local/local.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/alibaba/pouch/pkg/quota" - "github.com/alibaba/pouch/volume/driver" - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/quota" + "github.com/alibaba/pouch/storage/volume/driver" + "github.com/alibaba/pouch/storage/volume/types" ) var ( diff --git a/volume/modules/tmpfs/tmpfs.go b/storage/volume/modules/tmpfs/tmpfs.go similarity index 97% rename from volume/modules/tmpfs/tmpfs.go rename to storage/volume/modules/tmpfs/tmpfs.go index 45159f0d2..193a90d9e 100644 --- a/volume/modules/tmpfs/tmpfs.go +++ b/storage/volume/modules/tmpfs/tmpfs.go @@ -12,8 +12,8 @@ import ( "time" "github.com/alibaba/pouch/pkg/utils" - "github.com/alibaba/pouch/volume/driver" - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume/driver" + "github.com/alibaba/pouch/storage/volume/types" ) var ( diff --git a/volume/types/meta/convert.go b/storage/volume/types/meta/convert.go similarity index 100% rename from volume/types/meta/convert.go rename to storage/volume/types/meta/convert.go diff --git a/volume/types/meta/meta.go b/storage/volume/types/meta/meta.go similarity index 100% rename from volume/types/meta/meta.go rename to storage/volume/types/meta/meta.go diff --git a/volume/types/meta/types.go b/storage/volume/types/meta/types.go similarity index 100% rename from volume/types/meta/types.go rename to storage/volume/types/meta/types.go diff --git a/volume/types/selector.go b/storage/volume/types/selector.go similarity index 100% rename from volume/types/selector.go rename to storage/volume/types/selector.go diff --git a/volume/types/storage.go b/storage/volume/types/storage.go similarity index 98% rename from volume/types/storage.go rename to storage/volume/types/storage.go index 9c3dee284..b45305d29 100644 --- a/volume/types/storage.go +++ b/storage/volume/types/storage.go @@ -3,7 +3,7 @@ package types import ( "time" - "github.com/alibaba/pouch/volume/types/meta" + "github.com/alibaba/pouch/storage/volume/types/meta" ) // StorageSpec represents storage spec. diff --git a/volume/types/types.go b/storage/volume/types/types.go similarity index 100% rename from volume/types/types.go rename to storage/volume/types/types.go diff --git a/volume/types/volume.go b/storage/volume/types/volume.go similarity index 99% rename from volume/types/volume.go rename to storage/volume/types/volume.go index 5b6a2b84b..4990365f1 100644 --- a/volume/types/volume.go +++ b/storage/volume/types/volume.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/alibaba/pouch/volume/types/meta" + "github.com/alibaba/pouch/storage/volume/types/meta" ) // VolumeConditionType defines volume condition type. diff --git a/volume/vars.go b/storage/volume/vars.go similarity index 95% rename from volume/vars.go rename to storage/volume/vars.go index c013b5e79..ee976a00a 100644 --- a/volume/vars.go +++ b/storage/volume/vars.go @@ -1,7 +1,7 @@ package volume import ( - "github.com/alibaba/pouch/volume/types" + "github.com/alibaba/pouch/storage/volume/types" ) const (