CernVM-FS  2.9.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 116 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 245 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 74 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 193 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 43 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 131 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 14 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 112 of file cvmfs_geo.py.

dictionary cvmfs_geo.geo_cache = {}

Definition at line 35 of file cvmfs_geo.py.

int cvmfs_geo.geo_cache_max_entries = 100000

Definition at line 28 of file cvmfs_geo.py.

int cvmfs_geo.geo_cache_secs = 5

Definition at line 26 of file cvmfs_geo.py.

tuple cvmfs_geo.gilock = threading.Lock()

Definition at line 37 of file cvmfs_geo.py.

cvmfs_geo.maxminddb = None

Definition at line 13 of file cvmfs_geo.py.

tuple cvmfs_geo.namelock = threading.Lock()

Definition at line 38 of file cvmfs_geo.py.

int cvmfs_geo.namelookups = 0

Definition at line 29 of file cvmfs_geo.py.