Back to

Package utils

Latest Go to latest

The highest tagged major version is .

Published: 4 days ago | License: Apache-2.0 | Module:


func ExtractLogger

func ExtractLogger(ctx context.Context, origin string) *zap.SugaredLogger

ExtractLogger returns a sugared logger with the origin tag added.

func MonitorMemoryUsage

func MonitorMemoryUsage(
	ctx context.Context,
	maxHeapUsage int,
) error

MonitorMemoryUsage periodically logs memory usage stats and triggers garbage collection when heap allocations surpass maxHeapUsage.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier