Versions in this module Expand all Collapse all v0 v0.6.1 Jul 31, 2023 v0.0.4 Jul 31, 2023 Changes in this version + const TypeLimiter + var NewLimiterConfig = util.JsonInitializer(func() iface.ConfigValueItem { ... }) + func CopyDefaultLimitConfig() iface.ConfigValueItem + func NewLimiterWrapper(conLimit ConcurrencyLimiter, qpsLimit RateLimiter) limit.Updater + type ConcurrencyLimiter interface + Acquire func(ctx context.Context) bool + Release func(ctx context.Context) + Status func(ctx context.Context) (limit, occupied int) + func NewConcurrencyLimiter(lim int) ConcurrencyLimiter + func NewConnectionLimiter(lim int) ConcurrencyLimiter + type DummyConcurrencyLimiter struct + func (dcl *DummyConcurrencyLimiter) Acquire(ctx context.Context) bool + func (dcl *DummyConcurrencyLimiter) Release(ctx context.Context) + func (dcl *DummyConcurrencyLimiter) Status(ctx context.Context) (limit, occupied int) + type DummyRateLimiter struct + func (drl *DummyRateLimiter) Acquire(ctx context.Context) bool + func (drl *DummyRateLimiter) Status(ctx context.Context) (max, current int, interval time.Duration) + type LimitReporter interface + ConnOverloadReport func() + QPSOverloadReport func() + type LimiterConfig struct + ConnectionLimit int64 + QPSLimit int64 + func (l *LimiterConfig) DeepCopy() iface.ConfigValueItem + func (l *LimiterConfig) EqualsTo(item iface.ConfigValueItem) bool + type RateLimiter interface + Acquire func(ctx context.Context) bool + Status func(ctx context.Context) (max, current int, interval time.Duration) + func NewQPSLimiter(interval time.Duration, limit int) RateLimiter + type Updatable interface + UpdateLimit func(limit int)