mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-23 06:47:26 +00:00
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Update dependencies.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2/middleware/proxy"
|
"github.com/gofiber/fiber/v2/middleware/proxy"
|
||||||
"github.com/gookit/goutil/envutil"
|
"github.com/gookit/goutil/envutil"
|
||||||
@@ -13,6 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var cfg *config
|
var cfg *config
|
||||||
|
var once sync.Once
|
||||||
|
|
||||||
// function get value from the env where the value can be anything
|
// function get value from the env where the value can be anything
|
||||||
func getDetailsFromEnv[T any](key string, defaultValue T) T {
|
func getDetailsFromEnv[T any](key string, defaultValue T) T {
|
||||||
@@ -79,7 +81,9 @@ func parseConfig() {
|
|||||||
|
|
||||||
enableCache() // takes close to no resources, but can be used with dynamic query cache
|
enableCache() // takes close to no resources, but can be used with dynamic query cache
|
||||||
loadRatelimitConfig()
|
loadRatelimitConfig()
|
||||||
go enableApi()
|
once.Do(func() {
|
||||||
|
go enableApi()
|
||||||
|
})
|
||||||
prepareQueriesAndExemptions()
|
prepareQueriesAndExemptions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user