Expand description
IP enrichment end to end: provision the GeoIP databases, keep them fresh, and look addresses up through a cache sized for skewed traffic.
Reader crates leave provisioning to the caller, so every service grows its own downloader and its own idea of where the file lives. The enrichment tables in the log-shipping tools do the reading but hold no cache, so a hot address costs a full database traversal every time it appears. This crate is both halves.
Acquisition turns out not to be a geo concern at all, so table opens the
same fetch-verify-replace path to any CSV or JSON a deployment names in its
own config, indexed by an address, by a CIDR range, or by any column it has.
§Features
| feature | adds |
|---|---|
geoip (default) | geoip-download + geoip-lookup |
geoip-download | resolve, freshness-check, download, unpack, refresh, and table |
geoip-lookup | resident or mapped readers, the cache, geoip::GeoIpRecord |
metrics | emit through the metrics facade |
metrics-lookup | cache hit, miss, size and lookup duration |
§Databases are not bundled
Nothing here ships a database. Files are fetched at runtime from the
provider you configure, and each publisher sets its own terms for its own
data. geoip::source_terms reports where a given selection’s terms are
published, so they can be read at the source.
Re-exports§
Modules§
- geoip
geoip-downloadorgeoip-lookup - GeoIP databases: which ones a service wants, getting them onto disk, and looking addresses up in them.
- secret
- A credential that survives being formatted into a log line.
- table
geoip-download - A table fetched from wherever the operator names, keyed by whatever reaches its rows.
Constants§
- VERSION
- Crate version, for the user-agent a provider sees.