coldstart

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package coldstart tells the one invocation that paid for the execution environment's initialization apart from all the others.

The cold invocation is the first one any Powertools utility sees. Every handler decorator asks on entry, so the first invocation that runs through one of them claims it, and every utility that asks later during the same invocation gets the same answer. Concurrent invocations (Lambda Managed Instances) race for the claim; exactly one wins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(ctx context.Context) bool

Is reports whether the invocation ctx belongs to is the cold one. An environment initialized by provisioned concurrency has none.

func Reset

func Reset()

Reset forgets the cold invocation, as a fresh process would. Tests use it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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