async

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(ctx context.Context, handler func(ctx context.Context) error)

Dispatch executes a handler function asynchronously in a new goroutine. The background context inherits every value from the caller's ctx (logger, Sentry hub, trace IDs, etc.) but the cancellation signal is severed via context.WithoutCancel — the entry-point request will return before the background work completes, and we do not want that to cancel the tail. Handler errors route through errutil.Handle so they land in Sentry alongside the structured log. Pending dispatches are tracked by a package-level WaitGroup so tests can synchronise on completion via Wait().

func Wait

func Wait()

Wait blocks until all in-flight dispatches launched via Dispatch have returned. Intended for use in tests that need to assert on side effects of the async tail; production code must not call this.

Types

This section is empty.

Jump to

Keyboard shortcuts

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