diff --git a/config/applyResourceLimits.go b/config/setResourceLimit.go similarity index 97% rename from config/applyResourceLimits.go rename to config/setResourceLimit.go index 50755ba..a95da88 100644 --- a/config/applyResourceLimits.go +++ b/config/setResourceLimit.go @@ -17,7 +17,7 @@ var ( goroutineQueueMutex sync.Mutex ) -func ApplyResourceLimits(cfg *configTypes.ResourceLimits) { +func SetResourceLimit(cfg *configTypes.ResourceLimits) { // Set CPU cores runtime.GOMAXPROCS(cfg.CPUCores) diff --git a/main.go b/main.go index 5280614..2db3fd6 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ func main() { log.Fatal("Error loading config: ", err) } - config.ApplyResourceLimits(&cfg.ResourceLimits) // Apply limits once before starting the server + config.SetResourceLimit(&cfg.ResourceLimits) // Apply limits once before starting the server client, err := db.InitDB(cfg) if err != nil {