Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteConcurrently ¶
func ExecuteConcurrently[T any](ctx context.Context, funcs map[string]Func[T]) (map[string]T, error)
ExecuteConcurrently executes multiple repository functions concurrently It returns a map of results indexed by the provided keys, and the first error encountered (if any)
func ExecuteConcurrentlyTyped ¶
func ExecuteConcurrentlyTyped[T any, R any]( ctx context.Context, resultBuilder func(map[string]T) (R, error), funcs map[string]Func[T], ) (R, error)
ExecuteConcurrentlyTyped executes multiple repository functions concurrently and returns the results in a typed struct This is a more type-safe alternative to ExecuteConcurrently when you know the exact structure of the results
Types ¶
Click to show internal directories.
Click to hide internal directories.