Connector API
The connector API is used to start the agent runtime which is a web service the Paranet will use to interact with your actors.
The runtime should be started after you've registered your actors, but before you deploy them.
After you've registered actors, started the runtime and deployed actors, the main thread should just wait on the runtime task as follows:
loop = asyncio.events.get_event_loop()
loop.run_until_complete(connector.get_task())
get_task
Get the asyncio Task running the connector service. Use this method in the main thread.
Example:
loop = asyncio.events.get_event_loop()
loop.run_until_complete(connector.get_task())
Returns:
A future that represents the runtime connector service.
start
Start the connector service. The connector service is an HTTP server that allows the Paranet to communicate with the Python actors.
Arguments:
port- The port number the runtime service listens to (default: 3000)
stop
Stop the connector service.