20 lines
585 B
Python
20 lines
585 B
Python
import base64
|
|
from flask import Blueprint
|
|
from rail_proto.lib import Dispatch,RegionInfo
|
|
|
|
query_dispatch_blueprint = Blueprint('query_dispatch', __name__)
|
|
|
|
@query_dispatch_blueprint.route("/query_dispatch", methods=["GET"])
|
|
def query_dispatch():
|
|
rsp = Dispatch(
|
|
retcode=0,
|
|
region_list=[
|
|
RegionInfo(
|
|
name="NeonSR",
|
|
title="NeonSR",
|
|
env_type="21",
|
|
dispatch_url="http://127.0.0.1:21000/query_gateway",
|
|
)
|
|
]
|
|
)
|
|
return base64.b64encode(rsp.SerializeToString()).decode() |