mirror of
https://github.com/jkstack/libagent.git
synced 2025-12-24 12:11:57 +08:00
16 lines
296 B
Go
16 lines
296 B
Go
//go:build !windows && !aix && !darwin
|
|
// +build !windows,!aix,!darwin
|
|
|
|
package limit
|
|
|
|
import "github.com/containerd/cgroups/v3"
|
|
|
|
// Do set cgroups limit
|
|
func (cfg *Configure) Do(agentName string) {
|
|
if cgroups.Mode() == cgroups.Unified {
|
|
cfg.doV2(agentName)
|
|
return
|
|
}
|
|
cfg.doV1(agentName)
|
|
}
|