diff options
| author | 2025-03-09 17:47:56 +0100 | |
|---|---|---|
| committer | 2025-12-01 22:08:04 +0100 | |
| commit | b1af8fd87760b34e3ff2fd3bda38f211815a0473 (patch) | |
| tree | 9317fad1a7ec298d7a8d2678e4e422953bbc6f33 /vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups_linux.go | |
| parent | [chore] update URLs to forked source (diff) | |
| download | gotosocial-b1af8fd87760b34e3ff2fd3bda38f211815a0473.tar.xz | |
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups_linux.go')
| -rw-r--r-- | vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups_linux.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups_linux.go b/vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups_linux.go deleted file mode 100644 index fd2c7e497..000000000 --- a/vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups_linux.go +++ /dev/null @@ -1,32 +0,0 @@ -//go:build linux -// +build linux - -package memlimit - -// FromCgroup retrieves the memory limit from the cgroup. -func FromCgroup() (uint64, error) { - return fromCgroup(detectCgroupVersion) -} - -// FromCgroupV1 retrieves the memory limit from the cgroup v1 controller. -// After v1.0.0, this function could be removed and FromCgroup should be used instead. -func FromCgroupV1() (uint64, error) { - return fromCgroup(func(_ []mountInfo) (bool, bool) { - return true, false - }) -} - -// FromCgroupHybrid retrieves the memory limit from the cgroup v2 and v1 controller sequentially, -// basically, it is equivalent to FromCgroup. -// After v1.0.0, this function could be removed and FromCgroup should be used instead. -func FromCgroupHybrid() (uint64, error) { - return FromCgroup() -} - -// FromCgroupV2 retrieves the memory limit from the cgroup v2 controller. -// After v1.0.0, this function could be removed and FromCgroup should be used instead. -func FromCgroupV2() (uint64, error) { - return fromCgroup(func(_ []mountInfo) (bool, bool) { - return false, true - }) -} |
