refactor: rename iot client to stateless gateway

This commit is contained in:
2026-08-03 14:43:39 +08:00
parent 5edca1524f
commit aaede08f88
26 changed files with 92 additions and 111 deletions

View File

@@ -2,6 +2,6 @@
set -Eeuo pipefail
mkdir -p ./output
for module in api worker iot-client iot-server; do
for module in api worker iot-gateway iot-server; do
(cd "./backend/${module}" && GOARCH=amd64 GOOS=linux go build -o "../../output/${module}" ./cmd/main/main.go)
done

View File

@@ -6,6 +6,6 @@ PIDS=()
cleanup(){ trap - EXIT INT TERM; for pid in "${PIDS[@]}"; do kill "${pid}" 2>/dev/null || true; done; for pid in "${PIDS[@]}"; do wait "${pid}" 2>/dev/null || true; done; }
trap cleanup EXIT INT TERM
(cd "${PROJECT_ROOT}/backend/iot-server" && go run ./cmd/main/main.go -config etc/platform_iot_server_dev.yaml) & PIDS+=("$!")
(cd "${PROJECT_ROOT}/backend/iot-client" && go run ./cmd/main/main.go -config etc/platform_iot_client_dev.yaml) & PIDS+=("$!")
echo "IoT Server :12428 与 IoT Client :12429 已启动。"
(cd "${PROJECT_ROOT}/backend/iot-gateway" && go run ./cmd/main/main.go -config etc/platform_iot_gateway_dev.yaml) & PIDS+=("$!")
echo "IoT Server :12428 与 IoT Gateway :12429 已启动。"
wait -n "${PIDS[@]}"