[PR #128] [MERGED] geoip2: watch and update #280

Closed
opened 2026-03-01 17:24:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/abh/geodns/pull/128
Author: @tydavis
Created: 10/11/2021
Status: Merged
Merged: 10/31/2021
Merged by: @abh

Base: mainHead: geoip_concurrentUpdate


📝 Commits (5)

  • 0b19890 geoip2: watch and update
  • d5ab161 geoip2: add read lock to GetLocation
  • 654f28d geoip2: remove select default, use defer unlock
  • 749e8ce geoip2: consolidate open, open all DBs
  • a510b96 geoip2: add active-checks to queries

📊 Changes

3 files changed (+123 additions, -107 deletions)

View changed files

📝 http_test.go (+0 -2)
📝 targeting/geoip2/geoip2.go (+118 -101)
📝 targeting/targeting_test.go (+5 -4)

📄 Description

Add goroutine to watch file modification time each minute. Lock and
update the files independently if the modification time is newer than
the last time it was loaded.

Also ancillary fixes for type signatures, and formatting test files.

Fixes #116, #16


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/abh/geodns/pull/128 **Author:** [@tydavis](https://github.com/tydavis) **Created:** 10/11/2021 **Status:** ✅ Merged **Merged:** 10/31/2021 **Merged by:** [@abh](https://github.com/abh) **Base:** `main` ← **Head:** `geoip_concurrentUpdate` --- ### 📝 Commits (5) - [`0b19890`](https://github.com/abh/geodns/commit/0b19890ea831c4daea287849974306cfebd30702) geoip2: watch and update - [`d5ab161`](https://github.com/abh/geodns/commit/d5ab161fabda80779bc9c52e7eec446cb3b345f6) geoip2: add read lock to GetLocation - [`654f28d`](https://github.com/abh/geodns/commit/654f28d684b8d855a7219f288c6a4e88757a65ba) geoip2: remove select default, use defer unlock - [`749e8ce`](https://github.com/abh/geodns/commit/749e8ce73ed5296cb76bec4c890ca5746e494586) geoip2: consolidate open, open all DBs - [`a510b96`](https://github.com/abh/geodns/commit/a510b96fd1fc7b29eaa0ea8b1746d24564ad7d40) geoip2: add active-checks to queries ### 📊 Changes **3 files changed** (+123 additions, -107 deletions) <details> <summary>View changed files</summary> 📝 `http_test.go` (+0 -2) 📝 `targeting/geoip2/geoip2.go` (+118 -101) 📝 `targeting/targeting_test.go` (+5 -4) </details> ### 📄 Description Add goroutine to watch file modification time each minute. Lock and update the files independently if the modification time is newer than the last time it was loaded. Also ancillary fixes for type signatures, and formatting test files. Fixes #116, #16 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 17:24:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/geodns#280
No description provided.