Versions in this module Expand all Collapse all v1 v1.0.0 Mar 7, 2026 Changes in this version + type BackpressureManager struct + func NewBackpressureManager(maxQueueSize int, maxMemoryMB int64) *BackpressureManager + func (bpm *BackpressureManager) Disable() + func (bpm *BackpressureManager) Enable() + func (bpm *BackpressureManager) GetCurrentMemoryMB() int64 + func (bpm *BackpressureManager) IsMemoryExceeded() bool + func (bpm *BackpressureManager) ShouldReject(currentQueueSize int) bool + func (bpm *BackpressureManager) UpdateMemoryUsage() int64 + type CircuitBreaker struct + func NewCircuitBreaker(threshold float64, minSamples int, recoveryTime time.Duration) *CircuitBreaker + func (cb *CircuitBreaker) Call(fn func() error) error + func (cb *CircuitBreaker) IsOpen() bool + type CircuitState int + const StateClosed + const StateHalfOpen + const StateOpen + type PriorityRouter struct + func NewPriorityRouter(config QueueConfig) *PriorityRouter + func (pr *PriorityRouter) EstimateComplexity(job *entity.Job) int + func (pr *PriorityRouter) Route(job *entity.Job) entity.Priority + func (pr *PriorityRouter) ShouldUseFastPath(job *entity.Job) bool + type QueueConfig struct + CircuitBreakerMinSamples int + CircuitBreakerRecoveryTime int + CircuitBreakerThreshold float64 + EnableBackpressure bool + EnableCircuitBreaker bool + EnableComplexityRouting bool + EnableFastPath bool + FastPathThresholdMs int + MaxMemoryMB int64 + MaxWorkers int + MediumJobThresholdMs int + MinWorkers int + QueueCapacity int + QueueName string + RedisAddr string + RedisClient goredis.UniversalClient + SimpleJobThresholdMs int + func DefaultConfig() QueueConfig