Documentation ¶
Overview ¶
Package geo provides the Lat/Long distance calculation functionality and GeoIP lookup functionality used to determine the best peers to use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadDB ¶
DownloadDB will fetch a new geoip database from maxmind and install it, uncompressed, into the configured geodb_path config file path usually defined in the configuration files.
Types ¶
type DB ¶
DB handles opening and querying from the maxmind Cities geo memory mapped database (.mmdb) file.
type DummyProvider ¶
type DummyProvider struct{}
DummyProvider is used when we dont want to use this feature. It will always return 0, 0
func (*DummyProvider) Close ¶
func (d *DummyProvider) Close()
Close does nothing for the dummy provider
func (*DummyProvider) DownloadDB ¶
func (d *DummyProvider) DownloadDB(_ string, _ string) error
DownloadDB does nothing for the dummy provider
func (*DummyProvider) GetLocation ¶
func (d *DummyProvider) GetLocation(_ net.IP) Location
GetLocation will always return 0, 0 coordinates
type LatLong ¶
func LatLongFromString ¶
LatLongFromString will return a LatLong from a string formatted like N,-N