Go utilities for managing asynchronous function execution with race, all, and retry patterns.
Gollback is a Go library that provides simple utilities for managing the asynchronous execution of closures and callbacks. It offers patterns like Race, All, and Retry to handle concurrent operations efficiently, making it easier to write robust asynchronous code in Go.
Go developers building applications that require concurrent execution patterns, such as handling multiple asynchronous tasks, retrying operations, or racing callbacks for the first successful result.
Developers choose Gollback for its minimalistic yet powerful abstractions focused on simplicity and performance, providing straightforward implementations of common asynchronous patterns without unnecessary complexity.
Go asynchronous simple function utilities, for managing execution of closures and callbacks
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The Race function efficiently returns the first successful result, with benchmarks showing 2608 ns/op and low memory allocation, ideal for performance-sensitive scenarios.
All utilities integrate with Go's context package for cancellation and timeouts, as shown in the Retry example using context.WithTimeout for controlled execution.
Provides simple, focused functions like Race, All, and Retry with clear examples in the README, reducing boilerplate for common asynchronous patterns.
Benchmarks demonstrate low overhead, such as Retry at 5.93 ns/op with zero allocations, making it suitable for high-throughput applications.
Only covers three patterns (Race, All, Retry), lacking utilities for timeouts per callback, fallbacks, or more complex concurrency models mentioned in the minimalist philosophy.
Functions return interface{} types, requiring type assertions in user code and increasing runtime errors compared to generics-based alternatives in modern Go.
Errors are simply passed through without built-in aggregation or advanced management, such as retry with exponential backoff, forcing manual implementation for robust systems.