{"repo":"simplegear/rate-envelope-queue","free":true,"listed":false,"github":"https://github.com/simplegear/rate-envelope-queue","clone":"git clone https://github.com/simplegear/rate-envelope-queue.git","description":"Lightweight in-memory queue + scheduler for Go with middleware-style hooks and capacity/backpressure control.","language":"Go","stars":22,"topics":["go","golang","in-memory","queue","scheduler","workqueue","rate-envelope-queue","background-jobs","background-tasks","concurrency"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"rate-envelope-queue A lightweight, goroutine-safe wrapper around k8s.io/client-go/util/workqueue for managing tasks ( envelopes ) with a fixed worker pool, periodic scheduling, deadlines, hooks, and stamps (middleware) . Adds a safe queue lifecycle ( Start/Stop/Start ), buffering before first start, and queue capacity limiting. Under the hood it uses workqueue.TypedRateLimitingInterface . Deduplication happens by pointer to the element: repeated Add of the same pointer while it is in-flight is ignored. --- Table of Contents - Features - Installation - Quick Start - Concepts & Contracts - Envelope - Queue - Stamps (middleware) - Worker Behavior - Stop Modes - Capacity Limiting - Benchmarks - Metrics (Prometheus) - Examples - License --- Features Goroutine-safe in-memory queue for your service: - All public methods are safe to call from multiple goroutines. Send can be called concurrently. Multiple workers are supported via limit . Start/Stop are serialized internally. - This is not a distributed queue: there are no guarantees across processes/hosts. Ensure your hooks/invokers are thread-safe around shared state. What you get: - A clear lifecycle FSM: init → running → stopping → stopped - Both one-off and periodic tasks - Middleware chain via Stamp - Hooks : before/after/failure/success - Capacity accounting (quota) - Graceful or fast stop ( Drain / Stop ) and restartable queues ( Start() after Stop() ) Error/Hook semantics: - ErrStopEnvelope — intentional stop of a specific en","default_branch":null,"files":null,"tree":[],"storefront":"/r/simplegear","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/simplegear/rate-envelope-queue/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}