This module sets up BridgeDB and starts the servers running.
load
(state, hashring, clear=False)[source]¶Read and parse all descriptors, and load into a bridge hashring.
Read all the appropriate bridge files from the saved
State
, parse and validate them, and then
store them into our state.hashring
instance. The state
will be
saved again at the end of this function.
Parameters: |
|
---|
_reloadFn
(*args)[source]¶Placeholder callback function for _handleSIGHUP()
.
_handleSIGUSR1
(*args)[source]¶Handler for SIGUSR1. Calls doDumpBridges()
.
createBridgeRings
(cfg, proxyList, key)[source]¶Create the bridge distributors defined by the config file
Parameters: |
|
---|---|
Return type: | |
Returns: | A BridgeSplitter hashring, an
|
run
(options, reactor=<twisted.internet.epollreactor.EPollReactor object>)[source]¶This is BridgeDB’s main entry point and main runtime loop.
Given the parsed commandline options, this function handles locating the configuration file, loading and parsing it, and then either (re)parsing plus (re)starting the servers, or dumping bridge assignments to files.
Parameters: |
|
---|---|
Variables: | state – A persistent state object which holds config changes. |
runSubcommand
(options, config)[source]¶Run a subcommand from the ‘Commands’ section of the bridgedb help menu.
Parameters: |
|
---|---|
Raises: |
|