summaryrefslogtreecommitdiff
path: root/geo.go
AgeCommit message (Collapse)Author
2018-12-13add license informationkali kaneko
2018-12-13geolocate gateways and kd-treeKali Kaneko
during initialization, we fetch the eip-config.json file from the configured provider. we geolocate the gateways (using a golang package that has some cities missing, hence the workaround) and initialize a KD-Tree with the gateways. using the KD-Tree, it is very cheap to calculate the nearest gateway for every request, which is provider as a filed in the json to the client - as a suggestion to be used or not in the gateway selection process.