util

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextCanceledOrUnexpected added in v1.7.2

func ContextCanceledOrUnexpected(ctx context.Context, err error, component string) error

ContextCanceledOrUnexpected is used in errgroup.Go functions to ensure that an error is returned when a "Runner" function ended unexpectedly. Returns: - if ctx.Err() != nil -> ctx.Err() - if err != nil -> wrap(err, "component returned an unexpected error") - otherwise -> "component ended unexpectedly"

func IsStreamClosed

func IsStreamClosed(err error) bool

IsStreamClosed returns true when the error indicates a normal closing of a GRPC stream.

Types

This section is empty.

Jump to

Keyboard shortcuts

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