diff --git a/config/sizeLimiter.go b/config/setSizeLimit.go similarity index 95% rename from config/sizeLimiter.go rename to config/setSizeLimit.go index 48b9b62..651f302 100644 --- a/config/sizeLimiter.go +++ b/config/setSizeLimit.go @@ -18,7 +18,7 @@ func SetupSizeLimiter(cfg *config.ServerConfig) { sizeLimiter.AddKindSizeLimit(kindSizeLimit.Kind, kindSizeLimit.MaxSize) } - SetSizeLimiter(sizeLimiter) + SetSizeLimit(sizeLimiter) } func NewSizeLimiter(globalMaxSize int) *SizeLimiter { @@ -35,7 +35,7 @@ func GetSizeLimiter() *SizeLimiter { return sizeLimiterInstance } -func SetSizeLimiter(sl *SizeLimiter) { +func SetSizeLimit(sl *SizeLimiter) { sizeOnce.Do(func() { sizeLimiterInstance = sl })