https://github.com/gopal96685/throttler
A highly configurable Go library for rate-limiting, task scheduling, and priority-based execution with retries, backoff, and circuit breaking capabilities.
https://github.com/gopal96685/throttler
circuit-breaker concurrency go priority-queue ratelimit ratelimiter retry-mechanism taskqueue throttle throttling workerpool
Last synced: 6 months ago
JSON representation
A highly configurable Go library for rate-limiting, task scheduling, and priority-based execution with retries, backoff, and circuit breaking capabilities.
- Host: GitHub
- URL: https://github.com/gopal96685/throttler
- Owner: gopal96685
- License: mit
- Created: 2025-01-07T04:34:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-13T09:12:00.000Z (about 1 year ago)
- Last Synced: 2025-06-03T14:51:50.936Z (10 months ago)
- Topics: circuit-breaker, concurrency, go, priority-queue, ratelimit, ratelimiter, retry-mechanism, taskqueue, throttle, throttling, workerpool
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Throttler
[](https://pkg.go.dev/github.com/gopal96685/throttler)
[](./LICENSE)
[📖 Read the full article on Medium](https://medium.com/@gopal96685/introducing-throttler-a-go-library-for-simplified-task-management-and-rate-limiting-a1187510a57e)
**Throttler** is a Go library for managing task execution with features like:
- **Rate Limiting** to handle API or database constraints.
- **Task Scheduling** with retries, backoff, and priority management.
- **Circuit Breaking** to avoid cascading failures.
---
## Features
- Flexible APIs for defining tasks: Use closures or the `Executable` interface.
- Automatic retry with backoff for failed tasks.
- Rate limit enforcement to handle throughput-heavy workloads.
- Priority-based task execution with first-in-first-out (FIFO) fallback.
- Built-in metrics collection for monitoring queue size and execution.
---
## Installation
```bash
go get github.com/gopal96685/throttler