A Go library for orchestrating and synchronizing goroutines with a functional interface and minimal overhead.
go-floc is a Go library that helps developers orchestrate and synchronize goroutines with ease. It provides a functional interface for defining concurrent workflows, allowing jobs to run in parallel or sequence while managing execution flow. The library solves the complexity of manual goroutine synchronization by offering controlled entry and exit points.
Go developers building applications that require concurrent task execution, such as data processing pipelines, parallel computations, or workflow management systems.
Developers choose go-floc for its minimal overhead compared to raw goroutines, its intuitive functional API for composing jobs, and its built-in control mechanisms for managing flow execution, cancellation, and completion.
Floc: Orchestrate goroutines with ease.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Jobs are defined as simple functions that can be composed into sequences or parallels using run.Sequence and run.Parallel, making complex workflows easy to build and maintain.
Provides a single entry and exit point via floc.Run, with methods to cancel, complete, or fail flows at any time, ensuring predictable execution and error handling.
Designed to add as little overhead as possible compared to raw goroutines and sync primitives, as emphasized in the README's key features.
Offers constructs like run.Parallel to run jobs concurrently without manual synchronization code, simplifying parallel task execution.
The v3 release requires migration from v2 with path updates and type changes, which can be disruptive for existing projects, as admitted in the announcements section.
Lacks built-in support for common patterns like automatic retries, timeouts beyond basic control, or integration with Go's standard context package for cancellation propagation.
Uses a custom context system with key-value pairs (e.g., ctx.AddValue), which might be less intuitive and more error-prone than Go's native context.Context for data passing.
The README points to Godoc for details and external examples, indicating a lack of comprehensive tutorials or guides for beginners or complex use cases.