rundef

package
v1.0.12758-54d8f47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package rundef provides default runtime configurations for services. Most services should simply call Defaults

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Defaults

func Defaults(ctx context.Context) (err error)

Defaults configures recommended go runtime options such as GOMEMLIMIT to appropriate values for the detected environment

func MaxProcs

func MaxProcs(ctx context.Context) (err error)

func MemLimit

func MemLimit(ctx context.Context) (err error)

MemLimit sets the GOMEMLIMIT to the recommended default of 90% of the memory available. It attempts to calculate this from the process cgroup first and will fall back to the total system memory if cgroups is not available.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL