feature(geoip2_autoreload): Enable GeoIP2 auto_reload config (#11079)

* feature(geoip2_autoreload): GeoIP Autoreload

feature(geoip2_autoreload): fix lint

feature(geoip2_autoreload): changing flag interval

feature(geoip2_autoreload): tests - up and running

feature(geoip2_autoreload): tests - up and running

feature(geoip2): testing

feature(geoip2): remove typo

feature(geoip2_autoreload): fixing tests

* feature(geoip2_autoreload): working

* feature(geoip2_autoreload): including tests on geoip2 test file
This commit is contained in:
Matheus Fidelis 2024-03-19 11:32:15 -03:00 committed by GitHub
parent 9d251d955e
commit 3c4e78e6b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 84 additions and 0 deletions

View file

@ -436,6 +436,10 @@ type Configuration struct {
// By default this is disabled
UseGeoIP2 bool `json:"use-geoip2,omitempty"`
// GeoIP2AutoReloadMinutes enables autoreload on geoip2 setting the interval in minutes
// By default this is disabled using 0
GeoIP2AutoReloadMinutes int `json:"geoip2-autoreload-in-minutes,omitempty"`
// Enables or disables the use of the NGINX Brotli Module for compression
// https://github.com/google/ngx_brotli
EnableBrotli bool `json:"enable-brotli,omitempty"`
@ -841,6 +845,7 @@ func NewDefault() Configuration {
EnableAioWrite: true,
UseGzip: false,
UseGeoIP2: false,
GeoIP2AutoReloadMinutes: 0,
WorkerProcesses: strconv.Itoa(runtime.NumCPU()),
WorkerShutdownTimeout: "240s",
VariablesHashBucketSize: 256,