ctxutil

package
v0.0.0-...-4448a72 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmContextHasDeadline

func ConfirmContextHasDeadline(ctx context.Context)

ConfirmContextHasDeadline logs errors with the full stack trace if the given context does not have a deadline. Useful for confirming that all SQL client calls have a timeout.

func WithContextTimeout

func WithContextTimeout(ctx context.Context, timeout time.Duration, f func(ctx context.Context))

WithContextTimeout calls `f` with a context that has a timeout, and ensures that the cancel function gets called.

Types

This section is empty.

Jump to

Keyboard shortcuts

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