service

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function[IN, OUT any] func(ctx context.Context, in IN) (out OUT, err error)

Function gathers together things that change for the same reasons. A context must be handled to be "cloud native" because it allows propagation of deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes. This ensures efficient resource utilization and proper handling of asynchronous workflows in distributed systems.

func Wrap

func Wrap[IN, OUT any](fn func(in IN) (out OUT, err error)) Function[IN, OUT]

Wrap converts a simple function into one that respects a provided context. This enables the wrapped function to respond to context cancellation or timeout.

Jump to

Keyboard shortcuts

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