Rename the package to github.com/containerd/cgroups/v2#251
Rename the package to github.com/containerd/cgroups/v2#251kzys merged 3 commits intocontainerd:mainfrom
Conversation
498e53b to
78ab8d5
Compare
f0b5393 to
3bb251d
Compare
v2/manager.go
Outdated
| "time" | ||
|
|
||
| "github.com/containerd/cgroups/v2/stats" | ||
| "github.com/containerd/cgroups/v2/v2/stats" |
There was a problem hiding this comment.
This is ugly, but if we move types from v2/v2 to v2, having cgroups v3 (if there is) could be a headache. So I'd stay with this simple-yet-ugly naming.
There was a problem hiding this comment.
Having github.com/containerd/cgroups/v2/cgroup2 (instead of v2/v2) could be an option, by following the filesystem type.
There was a problem hiding this comment.
Can we just rename that to “unified” ?
There was a problem hiding this comment.
The cgroup v1 impl can be named “legacy”
There was a problem hiding this comment.
unified may work, but legacy is not future-proof. Would cgroup v2 be considered as legacy eventually?
There was a problem hiding this comment.
Hmm, but unified.NewManager doesn't look better than cgroups.NewManager.
There was a problem hiding this comment.
I'm settled to use cgroup2 now.
c279a06 to
86d803c
Compare
|
I'm open to move cgroup v1 files to cgroup1 directory, but I'd like to do that in a different PR since this one already touches 47 files. |
Does that change need to happen in this PR, this PR looks good. We can make the naming consistent in another PR since they will be separate commits anyway. |
I don't think so. |
Migrating off from gogo/protobuf is backward-incompatible for some consumers that use proto-generated structs such as hcsshim. Signed-off-by: Kazuyoshi Kato <[email protected]>
Signed-off-by: Kazuyoshi Kato <[email protected]>
Signed-off-by: Kazuyoshi Kato <[email protected]>
|
Can we now drop "v1" from github.com/containerd/cgroups/v2/stats/v1 ? |
Yes. How about doing the following in a follow-up PR?
Then we have the most under cgroups/v2/cgroup1 and cgroups/v2/cgroup2. |
SGTM I thought it can be just done in this PR (with a separate commit maybe) but either is fine to me |
Migrating off from gogo/protobuf is backward-incompatible for some
consumers that use proto-generated structs such as hcsshim.
Signed-off-by: Kazuyoshi Kato [email protected]