I see this function, and essentially, I want to somehow use it in a Go application that runs inside a cpu-limited container so the app can understand its environment better:
|
func (c CPUMax) extractQuotaAndPeriod() (int64, uint64, error) { |
|
quota, period, err := resources.CPU.Max.extractQuotaAndPeriod() |
I don't see any way to get at this information from the current public API.
Is this something that would make sense to include in this module? The readme says "inspecting" cgroups is one of its goals, so my guess is that it would be a good feature.
I see this function, and essentially, I want to somehow use it in a Go application that runs inside a cpu-limited container so the app can understand its environment better:
cgroups/cgroup2/cpu.go
Line 56 in f1e92d8
cgroups/cgroup2/manager.go
Line 953 in f1e92d8
I don't see any way to get at this information from the current public API.
Is this something that would make sense to include in this module? The readme says "inspecting" cgroups is one of its goals, so my guess is that it would be a good feature.