mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-14 04:37:17 +00:00
20 lines
485 B
Python
20 lines
485 B
Python
from functools import partial
|
|
|
|
from tfw.networking import ServerUplinkConnector, ServerConnector
|
|
from tfw.config import TFWENV
|
|
|
|
|
|
UPLINK_CONN_ADDR = f'tcp://localhost:{TFWENV.PULL_PORT}'
|
|
DOWNLINK_CONN_ADDR = f'tcp://localhost:{TFWENV.PUB_PORT}'
|
|
|
|
|
|
TFWServerUplinkConnector = partial(
|
|
ServerUplinkConnector,
|
|
connect_addr=UPLINK_CONN_ADDR
|
|
)
|
|
TFWServerConnector = partial(
|
|
ServerConnector,
|
|
downlink_connect_addr=DOWNLINK_CONN_ADDR,
|
|
uplink_connect_addr=UPLINK_CONN_ADDR
|
|
)
|