Function handler
FunctionHandler(registration, client)
¶
The function handler manages the StreamPipes Functions.
It controls the connection to the brokers, starts the functions, manages the broadcast of the live data and is able to stop the connection to the brokers and functions.
PARAMETER | DESCRIPTION |
---|---|
registration |
The registration, that contains the StreamPipesFunctions.
TYPE:
|
client |
The client to interact with the API.
TYPE:
|
ATTRIBUTE | DESCRIPTION |
---|---|
stream_contexts |
Map of all data stream contexts
TYPE:
|
brokers |
List of all registered brokers
TYPE:
|
disconnect()
¶
Disconnects from the brokers and stops all functions.
RETURNS | DESCRIPTION |
---|---|
None
|
|
force_stop_functions()
¶
Stops the StreamPipesFunctions when the event loop was stopped without stopping the functions.
RETURNS | DESCRIPTION |
---|---|
None
|
|
WARNS | DESCRIPTION |
---|---|
UserWarning
|
If there is a running event loop and the functions should be stopped by disconnecting from the broker. |
initializeFunctions()
¶
Creates the context for every data stream and starts the event loop to manage the StreamPipes Functions.
RETURNS | DESCRIPTION |
---|---|
None
|
|