patience

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package patience provides bounded channel receives with cancellation and error messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Await

func Await[T any](ctx context.Context, ch <-chan T, message string) (T, error)

Await receives from ch with a timeout and a descriptive error message if it times out. T is the type of the channel values.

func AwaitWithTimeout added in v0.2.8

func AwaitWithTimeout[T any](ctx context.Context, ch <-chan T, timeout time.Duration, message string) (T, error)

AwaitWithTimeout is like Await but creates the timeout context internally.

Types

This section is empty.

Jump to

Keyboard shortcuts

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