package
Version:
v0.0.11
Opens a new window with list of versions in this module.
Published: Oct 2, 2022
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package automax automatically sets GOMEMLIMIT & GOMAXPROCS to match the linux container memory & cpu quotas, if any.
func SetCpu(c ...config) func()
SetCpu puts GOMAXPROCS to match the linux container cpu quota (if any), returning an undo function.
It is a no-op in environments without a configured cpu quota.
The optional argument c is only used for test purposes.
func SetMem(c ...config) func()
SetMem puts GOMEMLIMIT to match the linux container memory quota (if any), returning an undo function.
It is a no-op in environments without a configured memory quota.
The optional argument c is only used for test purposes.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.