Skip to content

Commit 4e20758

Browse files
committed
Move stats/v1 to cgroup1/stats
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
1 parent 7c55330 commit 4e20758

19 files changed

+376
-375
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ cgutil:
2323
proto:
2424
protobuild --quiet ${PACKAGES}
2525
# Keep them Go-idiomatic and backward-compatible with the gogo/protobuf era.
26-
go-fix-acronym -w -a '(Cpu|Tcp|Rss)' $(shell find stats/v1/ cgroup2/stats/ -name '*.pb.go')
26+
go-fix-acronym -w -a '(Cpu|Tcp|Rss)' $(shell find cgroup1/stats/ cgroup2/stats/ -name '*.pb.go')

Protobuild.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ generators = ["go"]
1515

1616
# Aggregrate the API descriptors to lock down API changes.
1717
[[descriptors]]
18-
prefix = "github.com/containerd/cgroups/stats/v1"
19-
target = "stats/v1/metrics.pb.txt"
18+
prefix = "github.com/containerd/cgroups/cgroup1/stats"
19+
target = "cgroup1/stats/metrics.pb.txt"
2020
ignore_files = [
2121
"google/protobuf/descriptor.proto",
2222
]

cgroup1/blkio.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ import (
2525
"strconv"
2626
"strings"
2727

28-
v1 "github.com/containerd/cgroups/v2/stats/v1"
28+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
29+
2930
specs "github.com/opencontainers/runtime-spec/specs-go"
3031
)
3132

cgroup1/blkio_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strings"
2222
"testing"
2323

24-
v1 "github.com/containerd/cgroups/v2/stats/v1"
24+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2525
)
2626

2727
const data = `major minor #blocks name

cgroup1/cgroup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"syscall"
2929
"time"
3030

31-
v1 "github.com/containerd/cgroups/v2/stats/v1"
31+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
3232

3333
"github.com/opencontainers/runtime-spec/specs-go"
3434
)

cgroup1/control.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package cgroup1
1919
import (
2020
"os"
2121

22-
v1 "github.com/containerd/cgroups/v2/stats/v1"
22+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2323
specs "github.com/opencontainers/runtime-spec/specs-go"
2424
)
2525

cgroup1/cpu.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"path/filepath"
2323
"strconv"
2424

25-
v1 "github.com/containerd/cgroups/v2/stats/v1"
25+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2626
specs "github.com/opencontainers/runtime-spec/specs-go"
2727
)
2828

cgroup1/cpuacct.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"strconv"
2525
"strings"
2626

27-
v1 "github.com/containerd/cgroups/v2/stats/v1"
27+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2828
)
2929

3030
const nanosecondsInSecond = 1000000000

cgroup1/hugetlb.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strconv"
2323
"strings"
2424

25-
v1 "github.com/containerd/cgroups/v2/stats/v1"
25+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2626
specs "github.com/opencontainers/runtime-spec/specs-go"
2727
)
2828

cgroup1/memory.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"strconv"
2626
"strings"
2727

28-
v1 "github.com/containerd/cgroups/v2/stats/v1"
28+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2929
specs "github.com/opencontainers/runtime-spec/specs-go"
3030
"golang.org/x/sys/unix"
3131
)

cgroup1/memory_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"strings"
2424
"testing"
2525

26-
v1 "github.com/containerd/cgroups/v2/stats/v1"
26+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2727
)
2828

2929
const memoryData = `cache 1

cgroup1/pids.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strconv"
2323
"strings"
2424

25-
v1 "github.com/containerd/cgroups/v2/stats/v1"
25+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2626
specs "github.com/opencontainers/runtime-spec/specs-go"
2727
)
2828

cgroup1/pids_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"strconv"
2424
"testing"
2525

26-
v1 "github.com/containerd/cgroups/v2/stats/v1"
26+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2727
"github.com/opencontainers/runtime-spec/specs-go"
2828
)
2929

cgroup1/rdma.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"strconv"
2424
"strings"
2525

26-
v1 "github.com/containerd/cgroups/v2/stats/v1"
26+
v1 "github.com/containerd/cgroups/v2/cgroup1/stats"
2727
specs "github.com/opencontainers/runtime-spec/specs-go"
2828
)
2929

stats/v1/doc.go cgroup1/stats/doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
limitations under the License.
1515
*/
1616

17-
package v1
17+
package stats

0 commit comments

Comments
 (0)