ctxutil

package
v0.0.0-...-8caed39 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: OSL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ctxutil holds small context helpers shared across bounded contexts. Keep it minimal: add a helper here only when more than one package needs it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetachedWithTimeout

func DetachedWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc)

DetachedWithTimeout returns a context that keeps ctx's values but drops its cancellation and deadline, bounded instead by a fresh timeout of d.

Use it for work that must outlive the request or caller that started it, such as a provider call that commits money and the terminal write recording its outcome: a client disconnect or a per-request timeout must not cancel either midway. Always defer the returned CancelFunc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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