Consensus.server_selector_util module
Purpose of server_selector_util
This utility module has one purpose; to serve EsriServers.
The available servers are listed in the server_selector()
function and this dictionary should be manually expanded when new EsriServers are added as built-in options.
The get_server()
function is then used by the SmartLinker()
class to select the server to create a graph on.
- Consensus.server_selector_util.get_server(key, **kwargs)
Helper function to get the server based on the provided name.
- Parameters:
key (str) – Name of the server.
**kwargs (
Dict
[str
,Any
]) – Keyword arguments to pass to the server class.
- Returns:
Instance of the server class.
- Return type:
Any
- Consensus.server_selector_util.get_server_name(server=None)
Get the name of the server.
- Parameters:
server (str) – Name of the server.
- Returns:
Name of the server.
- Return type:
str
- Consensus.server_selector_util.server_selector()
Select the server based on the provided name.
- Returns:
Dictionary of servers.
- Return type:
Dict[str, Any]