goflow#
Go library for building concurrent applications with rate limiting, task scheduling, and streaming.
New to goflow? Read Why goflow to understand the problem space and architecture.
Installation#
go get github.com/vnykmshr/goflowQuick Example#
package main
import (
"context"
"log"
"github.com/vnykmshr/goflow/pkg/ratelimit/bucket"
"github.com/vnykmshr/goflow/pkg/scheduling/workerpool"
)
func main() {
limiter, _ := bucket.NewSafe(100, 200)
pool, _ := workerpool.NewSafe(5, 100)
defer func() { <-pool.Shutdown() }()
if limiter.Allow() {
pool.Submit(workerpool.TaskFunc(func(ctx context.Context) error {
log.Println("Processing request")
return nil
}))
}
}Documentation#
Guides
- Getting Started — Installation and basic usage
- Decision Guide — Choosing the right components
- Migration — Upgrading from previous versions
Features
- Rate Limiting — Token bucket, leaky bucket, concurrency
- Task Scheduling — Worker pools, cron scheduler
- Streaming — Functional data processing
Reference
- Contributing — How to contribute
- Security — Security policy
- Changelog — Release history
Resources#
- API Reference — Complete API documentation
- Examples — Working code examples
- GitHub Repository — Source code and issues