Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/middleware/limithandler/middleware.go')
-rw-r--r--internal/middleware/limithandler/middleware.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/middleware/limithandler/middleware.go b/internal/middleware/limithandler/middleware.go
index 81e91af9f..11dc51351 100644
--- a/internal/middleware/limithandler/middleware.go
+++ b/internal/middleware/limithandler/middleware.go
@@ -28,17 +28,12 @@ func LimitConcurrencyByRepo(ctx context.Context) string {
return ""
}
-// Limiter limits incoming requests
-type Limiter interface {
- Limit(ctx context.Context, lockKey string, f LimitedFunc) (interface{}, error)
-}
-
// LimitedFunc represents a function that will be limited
type LimitedFunc func() (resp interface{}, err error)
// LimiterMiddleware contains rate limiter state
type LimiterMiddleware struct {
- methodLimiters map[string]Limiter
+ methodLimiters map[string]*ConcurrencyLimiter
getLockKey GetLockKey
requestsDroppedMetric *prometheus.CounterVec
collect func(metrics chan<- prometheus.Metric)