Skip to content

Commit 3888dda

Browse files
kolyshkinPaweł Szulik
authored andcommitted
container: rm CgroupSubsystems type
Replace it with map[string]string, which it is. This is a continuation of the previous commit, separated out for review clarity. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 4d1fb1c commit 3888dda

File tree

15 files changed

+19
-24
lines changed

15 files changed

+19
-24
lines changed

cmd/internal/container/mesos/factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type mesosFactory struct {
4646
machineInfoFactory info.MachineInfoFactory
4747

4848
// Information about the cgroup subsystems.
49-
cgroupSubsystems libcontainer.CgroupSubsystems
49+
cgroupSubsystems map[string]string
5050

5151
// Information about mounted filesystems.
5252
fsInfo fs.FsInfo

cmd/internal/container/mesos/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type mesosContainerHandler struct {
5252

5353
func newMesosContainerHandler(
5454
name string,
55-
cgroupSubsystems containerlibcontainer.CgroupSubsystems,
55+
cgroupSubsystems map[string]string,
5656
machineInfoFactory info.MachineInfoFactory,
5757
fsInfo fs.FsInfo,
5858
includedMetrics container.MetricSet,

cmd/internal/container/mesos/handler_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/stretchr/testify/assert"
2323

2424
"github.com/google/cadvisor/container"
25-
containerlibcontainer "github.com/google/cadvisor/container/libcontainer"
2625
"github.com/google/cadvisor/fs"
2726
info "github.com/google/cadvisor/info/v1"
2827
)
@@ -42,7 +41,7 @@ func TestContainerReference(t *testing.T) {
4241
name string
4342
machineInfoFactory info.MachineInfoFactory
4443
fsInfo fs.FsInfo
45-
cgroupSubsystems containerlibcontainer.CgroupSubsystems
44+
cgroupSubsystems map[string]string
4645
inHostNamespace bool
4746
metadataEnvAllowList []string
4847
includedMetrics container.MetricSet

container/containerd/factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type containerdFactory struct {
4848
client ContainerdClient
4949
version string
5050
// Information about the mounted cgroup subsystems.
51-
cgroupSubsystems libcontainer.CgroupSubsystems
51+
cgroupSubsystems map[string]string
5252
// Information about mounted filesystems.
5353
fsInfo fs.FsInfo
5454
includedMetrics container.MetricSet

container/containerd/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func newContainerdContainerHandler(
5959
name string,
6060
machineInfoFactory info.MachineInfoFactory,
6161
fsInfo fs.FsInfo,
62-
cgroupSubsystems containerlibcontainer.CgroupSubsystems,
62+
cgroupSubsystems map[string]string,
6363
inHostNamespace bool,
6464
metadataEnvAllowList []string,
6565
includedMetrics container.MetricSet,

container/containerd/handler_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"github.com/stretchr/testify/assert"
2525

2626
"github.com/google/cadvisor/container"
27-
containerlibcontainer "github.com/google/cadvisor/container/libcontainer"
2827
"github.com/google/cadvisor/fs"
2928
info "github.com/google/cadvisor/info/v1"
3029
)
@@ -50,7 +49,7 @@ func TestHandler(t *testing.T) {
5049
name string
5150
machineInfoFactory info.MachineInfoFactory
5251
fsInfo fs.FsInfo
53-
cgroupSubsystems containerlibcontainer.CgroupSubsystems
52+
cgroupSubsystems map[string]string
5453
inHostNamespace bool
5554
metadataEnvAllowList []string
5655
includedMetrics container.MetricSet

container/crio/factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type crioFactory struct {
5050
storageDir string
5151

5252
// Information about the mounted cgroup subsystems.
53-
cgroupSubsystems libcontainer.CgroupSubsystems
53+
cgroupSubsystems map[string]string
5454

5555
// Information about mounted filesystems.
5656
fsInfo fs.FsInfo

container/crio/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func newCrioContainerHandler(
8484
fsInfo fs.FsInfo,
8585
storageDriver storageDriver,
8686
storageDir string,
87-
cgroupSubsystems containerlibcontainer.CgroupSubsystems,
87+
cgroupSubsystems map[string]string,
8888
inHostNamespace bool,
8989
metadataEnvAllowList []string,
9090
includedMetrics container.MetricSet,

container/crio/handler_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"github.com/stretchr/testify/assert"
2222

2323
"github.com/google/cadvisor/container"
24-
containerlibcontainer "github.com/google/cadvisor/container/libcontainer"
2524
"github.com/google/cadvisor/fs"
2625
info "github.com/google/cadvisor/info/v1"
2726
)
@@ -35,7 +34,7 @@ func TestHandler(t *testing.T) {
3534
fsInfo fs.FsInfo
3635
storageDriver storageDriver
3736
storageDir string
38-
cgroupSubsystems containerlibcontainer.CgroupSubsystems
37+
cgroupSubsystems map[string]string
3938
inHostNamespace bool
4039
metadataEnvAllowList []string
4140
includedMetrics container.MetricSet

container/docker/factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type dockerFactory struct {
116116
client *docker.Client
117117

118118
// Information about the mounted cgroup subsystems.
119-
cgroupSubsystems libcontainer.CgroupSubsystems
119+
cgroupSubsystems map[string]string
120120

121121
// Information about mounted filesystems.
122122
fsInfo fs.FsInfo

0 commit comments

Comments
 (0)