Refactor: Remove deprecated gRPC service files and implement new API structure

- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`.
- Added new API server implementations for objectstory, player, and shop services.
- Introduced configuration files for new APIs in `etc/*.yaml`.
- Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`.
- Removed unused user update handler and user API files.
- Added utility functions for context management and HTTP header parsing.
- Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
This commit is contained in:
wwweww
2026-02-28 18:35:56 +08:00
parent d2f33b4b96
commit 19cc7a778c
349 changed files with 42548 additions and 1453 deletions
+100 -45
View File
@@ -131,11 +131,21 @@ data:
timeout: 30s
# ===== 未来按服务拆分路由(服务未落地前先注释) =====
# - match:
# prefix: /api/v1/games
# route:
# cluster: game_api_cluster
# timeout: 30s
- match:
prefix: /api/v1/games
route:
cluster: game_api_cluster
timeout: 30s
- match:
prefix: /api/v1/players
route:
cluster: player_api_cluster
timeout: 30s
# - match:
# prefix: /api/v1/shop
# route:
# cluster: player_api_cluster
# timeout: 30s
# - match:
# prefix: /api/v1/orders
# route:
@@ -551,35 +561,93 @@ data:
socket_address:
address: email-api-svc.juwan.svc.cluster.local
port_value: 8888
- name: player_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: player_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: player-api-svc.juwan.svc.cluster.local
port_value: 8888
- name: game_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: game_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: game-api-svc.juwan.svc.cluster.local
port_value: 8888
- name: objectstory_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: objectstory_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: objectstory-api-svc.juwan.svc.cluster.local
port_value: 8888
- name: wallet_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: wallet_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: wallet-api-svc.juwan.svc.cluster.local
port_value: 8888
- name: shop_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: shop_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: shop-api-svc.juwan.svc.cluster.local
port_value: 8888
- name: community_api_cluster
connect_timeout: 2s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: community_api_cluster
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: community-api-svc.juwan.svc.cluster.local
port_value: 8888
# ===== 未来服务集群预留(当前未实现,先注释) =====
# - name: game_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: game_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: game-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: objectstory_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: objectstory_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: objectstory-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: order_api_cluster
# connect_timeout: 2s
@@ -595,19 +663,6 @@ data:
# address: order-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: player_api_cluster
# connect_timeout: 2s
# type: STRICT_DNS
# lb_policy: ROUND_ROBIN
# load_assignment:
# cluster_name: player_api_cluster
# endpoints:
# - lb_endpoints:
# - endpoint:
# address:
# socket_address:
# address: player-api-svc.juwan.svc.cluster.local
# port_value: 8888
#
# - name: shop_api_cluster
# connect_timeout: 2s