mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #4784 from kolyshkin/cgr-fup
cgroups separation followup
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Package configs provides various container-related configuration types
|
||||
// used by libcontainer.
|
||||
package configs
|
||||
|
||||
import (
|
||||
@@ -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"
|
||||
)
|
||||
@@ -146,7 +149,7 @@ type Config struct {
|
||||
|
||||
// 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"`
|
||||
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 executed.
|
||||
@@ -459,7 +462,7 @@ type Capabilities struct {
|
||||
Ambient []string `json:"Ambient,omitempty"`
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
||||
Reference in New Issue
Block a user