Documentation
¶
Overview ¶
Package georouting renders a geo-aware CoreDNS zone that answers one apex hostname with the nearest healthy node by client location. It is the pure-Go, deterministic core of Design 06 (Lattice-native GeoDNS): no network, no new dependency. The server feeds it participating nodes (with operator-owned NodeGeo coordinates + health) and ships the rendered config to the Design 02 CoreDNS node via the existing reviewed apply path. CoreDNS does the actual client geolocation at query time via its stock geoip+view plugins.
Index ¶
Constants ¶
View Source
const ( // StrategyGeoIP routes by client continent (CoreDNS geoip+view; needs a // GeoLite2 DB on the node). StrategyAllHealthy is a zero-dependency degrade: // round-robin all healthy nodes (failover, but no geo). StrategyGeoIP = "geoip" StrategyAllHealthy = "all-healthy" DefaultTTL = 60 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoNode ¶
type GeoNode struct {
ID string
Name string
IPv4 string
IPv6 string
Lat float64
Lon float64
HasGeo bool
Healthy bool
}
GeoNode is one participating target as the renderer needs it.
type Input ¶
type Input struct {
Hostname string
TTL int
Strategy string
GeoIPDBPath string // path to the GeoLite2 DB on the node (geoip strategy)
Nodes []GeoNode
}
Input is the render request.
Click to show internal directories.
Click to hide internal directories.