Skip to content
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
5 changes: 4 additions & 1 deletion libcontainer/configs/cgroup_deprecated.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package configs // Deprecated: use [github.com/opencontainers/cgroups].
package configs

import "github.com/opencontainers/cgroups"

// Deprecated: use [github.com/opencontainers/cgroups].
type (
Cgroup = cgroups.Cgroup
Resources = cgroups.Resources
Expand All @@ -14,12 +15,14 @@ type (
IfPrioMap = cgroups.IfPrioMap
)

// Deprecated: use [github.com/opencontainers/cgroups].
const (
Undefined = cgroups.Undefined
Frozen = cgroups.Frozen
Thawed = cgroups.Thawed
)

// Deprecated: use [github.com/opencontainers/cgroups].
var (
NewWeightDevice = cgroups.NewWeightDevice
NewThrottleDevice = cgroups.NewThrottleDevice
Expand Down
9 changes: 6 additions & 3 deletions libcontainer/configs/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Package configs provides various container-related configuration types
// used by libcontainer.
package configs

import (
Expand All @@ -14,6 +16,7 @@ import (
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"

"github.com/opencontainers/cgroups"
devices "github.com/opencontainers/cgroups/devices/config"
"github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down Expand Up @@ -142,8 +145,8 @@ type Config struct {
Routes []*Route `json:"routes"`

// Cgroups specifies specific cgroup settings for the various subsystems that the container is
// placed into to limit the resources the container has available
Cgroups *Cgroup `json:"cgroups"`
// placed into to limit the resources the container has available.
Cgroups *cgroups.Cgroup `json:"cgroups"`

// AppArmorProfile specifies the profile to apply to the process running in the container and is
// change at the time the process is execed
Expand Down Expand Up @@ -456,7 +459,7 @@ type Capabilities struct {
Ambient []string
}

// Deprecated: use (Hooks).Run instead.
// Deprecated: use [Hooks.Run] instead.
func (hooks HookList) RunHooks(state *specs.State) error {
for i, h := range hooks {
if err := h.Run(state); err != nil {
Expand Down