runtime

package
v0.0.0-...-a99bcb5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: OSL-3.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runtime holds small helpers that inspect the process's runtime environment. Kept deliberately minimal — this is a shared surface, not a grab-bag for utility code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLambda

func IsLambda() bool

IsLambda reports whether the current process is running inside an AWS Lambda execution environment. Detection is based on AWS_LAMBDA_RUNTIME_API, which the Lambda service sets for every function, zip or container image alike (the runtime interface client in a Lambda container image needs it). It is absent on non-Lambda deployments: local dev runs and the long-running servers (Fargate, Cloud Run, Container Apps).

The flag answers one question only: is the process frozen between invocations, so that background goroutines (e.g. the stale-while-revalidate refresh) cannot be relied on to finish? It says nothing about whether the deployment runs a single instance or many, so do not use it to decide whether process-local state is shared across requests.

Callers asking the freeze question should use this helper rather than reading the env var directly so the detection rule stays consistent across call sites.

Types

This section is empty.

Jump to

Keyboard shortcuts

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