Skip to content

Commit

Permalink
Move storage, mesos, global container integrations under cmd/internal
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Mar 23, 2020
1 parent d4cce1c commit 855ad76
Show file tree
Hide file tree
Showing 28 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cmd/cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/google/cadvisor/version"

// Register container providers
_ "github.com/google/cadvisor/container/install"
_ "github.com/google/cadvisor/cmd/internal/container/install"

// Register CloudProviders
_ "github.com/google/cadvisor/utils/cloudinfo/aws"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package install

import (
_ "github.com/google/cadvisor/cmd/internal/container/mesos/install"
_ "github.com/google/cadvisor/container/containerd/install"
_ "github.com/google/cadvisor/container/crio/install"
_ "github.com/google/cadvisor/container/docker/install"
_ "github.com/google/cadvisor/container/mesos/install"
_ "github.com/google/cadvisor/container/systemd/install"
)
File renamed without changes.
File renamed without changes.
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 @@ -16,8 +16,8 @@
package install

import (
"github.com/google/cadvisor/cmd/internal/container/mesos"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/mesos"
"k8s.io/klog"
)

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 @@ -17,9 +17,9 @@ package bigquery
import (
"os"

"github.com/google/cadvisor/cmd/internal/storage/bigquery/client"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/bigquery/client"

bigquery "google.golang.org/api/bigquery/v2"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"time"

"github.com/SeanDolphin/bqschema"
"github.com/google/cadvisor/storage/bigquery/client"
"github.com/google/cadvisor/cmd/internal/storage/bigquery/client"
)

type container struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"testing"
"time"

"github.com/google/cadvisor/cmd/internal/storage/test"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/test"

influxdb "github.com/influxdb/influxdb/client"
"github.com/stretchr/testify/assert"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package statsd

import (
client "github.com/google/cadvisor/cmd/internal/storage/statsd/client"
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/storage"
client "github.com/google/cadvisor/storage/statsd/client"
)

func init() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions cmd/storagedriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import (
"time"

"github.com/google/cadvisor/cache/memory"
_ "github.com/google/cadvisor/cmd/internal/storage/bigquery"
_ "github.com/google/cadvisor/cmd/internal/storage/elasticsearch"
_ "github.com/google/cadvisor/cmd/internal/storage/influxdb"
_ "github.com/google/cadvisor/cmd/internal/storage/kafka"
_ "github.com/google/cadvisor/cmd/internal/storage/redis"
_ "github.com/google/cadvisor/cmd/internal/storage/statsd"
_ "github.com/google/cadvisor/cmd/internal/storage/stdout"
"github.com/google/cadvisor/storage"
_ "github.com/google/cadvisor/storage/bigquery"
_ "github.com/google/cadvisor/storage/elasticsearch"
_ "github.com/google/cadvisor/storage/influxdb"
_ "github.com/google/cadvisor/storage/kafka"
_ "github.com/google/cadvisor/storage/redis"
_ "github.com/google/cadvisor/storage/statsd"
_ "github.com/google/cadvisor/storage/stdout"

"k8s.io/klog"
)
Expand Down
7 changes: 6 additions & 1 deletion manager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ import (
"github.com/stretchr/testify/assert"
clock "k8s.io/utils/clock/testing"

_ "github.com/google/cadvisor/container/install"
// install all the container runtimes included in the library version for testing.
// as these are moved to cmd/internal/container, remove them from here.
_ "github.com/google/cadvisor/container/containerd/install"
_ "github.com/google/cadvisor/container/crio/install"
_ "github.com/google/cadvisor/container/docker/install"
_ "github.com/google/cadvisor/container/systemd/install"
)

// TODO(vmarmol): Refactor these tests.
Expand Down

0 comments on commit 855ad76

Please sign in to comment.