CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cvmfs_geo Namespace Reference

Functions

def open_geodb
 
def lookup_geoinfo
 
def distance_on_unit_sphere
 
def addr_geoinfo
 
def name_geoinfo
 
def geosort_servers
 
def api
 

Variables

 maxminddb = None
 
int geo_cache_secs = 5
 
int geo_cache_max_entries = 100000
 
int namelookups = 0
 
dictionary geo_cache = {}
 
tuple gilock = threading.Lock()
 
tuple namelock = threading.Lock()
 
tuple addr_pattern = re.compile('^[0-9a-zA-Z.:-]*$')
 

Function Documentation

def cvmfs_geo.addr_geoinfo (   now,
  addr 
)

Definition at line 117 of file cvmfs_geo.py.

Referenced by api(), and test_cvmfs_geo.GeoTest.test2AddrGeoinfo().

Here is the call graph for this function:

Here is the caller graph for this function:

def cvmfs_geo.api (   path_info,
  repo_name,
  version,
  start_response,
  environ 
)

Definition at line 249 of file cvmfs_geo.py.

Referenced by cvmfs_api.dispatch().

Here is the call graph for this function:

Here is the caller graph for this function:

def cvmfs_geo.distance_on_unit_sphere (   lat1,
  long1,
  lat2,
  long2 
)

Definition at line 75 of file cvmfs_geo.py.

Referenced by geosort_servers().

Here is the caller graph for this function:

def cvmfs_geo.geosort_servers (   now,
  gir_rem,
  servers,
  trycdn = False 
)

Definition at line 197 of file cvmfs_geo.py.

Referenced by api(), and test_cvmfs_geo.GeoTest.test4GeosortServers().

Here is the call graph for this function:

Here is the caller graph for this function:

def cvmfs_geo.lookup_geoinfo (   now,
  addr 
)

Definition at line 44 of file cvmfs_geo.py.

Referenced by addr_geoinfo(), and name_geoinfo().

Here is the call graph for this function:

Here is the caller graph for this function:

def cvmfs_geo.name_geoinfo (   now,
  name 
)

Definition at line 132 of file cvmfs_geo.py.

Referenced by api(), geosort_servers(), and test_cvmfs_geo.GeoTest.test3NameGeoinfo().

Here is the call graph for this function:

Here is the caller graph for this function:

def cvmfs_geo.open_geodb (   dbname)

Definition at line 15 of file cvmfs_geo.py.

Referenced by lookup_geoinfo().

Here is the caller graph for this function:

Variable Documentation

tuple cvmfs_geo.addr_pattern = re.compile('^[0-9a-zA-Z.:-]*$')

Definition at line 113 of file cvmfs_geo.py.

dictionary cvmfs_geo.geo_cache = {}

Definition at line 36 of file cvmfs_geo.py.

int cvmfs_geo.geo_cache_max_entries = 100000

Definition at line 29 of file cvmfs_geo.py.

int cvmfs_geo.geo_cache_secs = 5

Definition at line 27 of file cvmfs_geo.py.

tuple cvmfs_geo.gilock = threading.Lock()

Definition at line 38 of file cvmfs_geo.py.

cvmfs_geo.maxminddb = None

Definition at line 14 of file cvmfs_geo.py.

tuple cvmfs_geo.namelock = threading.Lock()

Definition at line 39 of file cvmfs_geo.py.

int cvmfs_geo.namelookups = 0

Definition at line 30 of file cvmfs_geo.py.