Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move pkg to correct places #1147

Merged
merged 1 commit into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cli/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion cli/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions daemon/mgr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion daemon/mgr/spec_blkio.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion daemon/mgr/spec_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions daemon/mgr/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions hack/module
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions hack/package/deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions volume/core.go → storage/volume/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions volume/core_util.go → storage/volume/core_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion volume/types/volume.go → storage/volume/types/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion volume/vars.go → storage/volume/vars.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package volume

import (
"github.com/alibaba/pouch/volume/types"
"github.com/alibaba/pouch/storage/volume/types"
)

const (
Expand Down