mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
## What changed? Add rate limiter on low priority replication tasks ## Why? This gives the ability to wire up rate limiter on replication stack. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s)
25 lines
526 B
Go
25 lines
526 B
Go
package replication
|
|
|
|
import (
|
|
"go.temporal.io/server/common/quotas"
|
|
)
|
|
|
|
const (
|
|
taskSchedulerToken = 1
|
|
)
|
|
|
|
type (
|
|
ServerSchedulerRateLimiter quotas.RequestRateLimiter
|
|
ClientSchedulerRateLimiter quotas.RequestRateLimiter
|
|
)
|
|
|
|
func ClientSchedulerRateLimiterProvider() ClientSchedulerRateLimiter {
|
|
// Experiment with no op rate limiter
|
|
return quotas.NoopRequestRateLimiter
|
|
}
|
|
|
|
func ServerSchedulerRateLimiterProvider() ServerSchedulerRateLimiter {
|
|
// Experiment with no op rate limiter
|
|
return quotas.NoopRequestRateLimiter
|
|
}
|