Documentation ¶
Overview ¶
Package auto does automatic detection and runtime configuration for certain environments.
All top-level functions are not safe to call concurrently.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPU ¶
func CPU()
CPU guesses a good number for GOMAXPROCS based on information gleaned from the current process's cgroup.
func Memory ¶ added in v4.6.0
func Memory()
Memory sets the runtime's memory limit based on information gleaned from the current process's cgroup. See debug.SetMemoryLimit for details on the effects of setting the limit. This does mean that attempting to run Clair in an aggressively constrained environment may cause excessive CPU time spent in garbage collection. Excessive GC can be prevented by increasing the resources allowed or pacing Clair as a whole by reducing the CPU allocation or limiting the number of concurrent requests.
The process' "memory.max" limit (for cgroups v2) or "memory.limit_in_bytes" (for cgroups v1) are the values consulted.
Types ¶
This section is empty.