Documentation
¶
Overview ¶
Package runtime provides runtime-related helpers used by go-service.
This package contains small utilities such as:
- Must, which panics on non-nil errors (used for strict startup/config paths),
- ConvertRecover, which converts recovered panic values into errors, and
- Version, which reports build info version (or "development").
It also integrates optional runtime configuration such as setting Go's memory limit (see RegisterMemLimit).
Start with `Must`, `ConvertRecover`, `Version`, and `Module`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRecovered = errors.New("recovered")
ErrRecovered is used to wrap panic values converted to an error.
var Module = di.Module( di.Register(RegisterMemLimit), )
Module for fx.
Functions ¶
func ConvertRecover ¶
ConvertRecover converts a recovered panic value into an error wrapped with ErrRecovered.
func RegisterMemLimit ¶
RegisterMemLimit configures Go's memory limit using automemlimit.
This function attempts to set GOMEMLIMIT automatically based on the container/cgroup memory limit. Any returned values and errors are intentionally ignored.
Types ¶
This section is empty.