topfans/backend/services/socialService/configs/dubbo.yaml
2026-04-07 22:29:48 +08:00

51 lines
1.4 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Dubbo 配置文件
# 当前阶段服务使用编程式直连main.go 中通过 flag/env 传入地址),此文件仅作占位。
# 后续引入 Nacos 服务注册中心后,取消注释并在 main.go 中调用 config.Load() 加载此文件。
dubbo:
# 应用配置
application:
name: social-service
version: 1.0.0
# 注册中心配置(暂未启用,后续接入 Nacos 时取消注释)
# registries:
# nacos:
# protocol: nacos
# address: 127.0.0.1:8848
# timeout: 5s
# 协议配置
protocols:
triple:
name: tri
port: 20002 # Social Service 端口
# Provider 配置
provider:
# registry-ids: nacos # 接入 Nacos 后取消注释
protocol-ids: triple
services:
SocialService:
interface: "github.com.topfans.backend.pkg.proto.social.SocialService"
# Consumer 配置
consumer:
# registry-ids: nacos # 接入 Nacos 后取消注释
references:
# User Service 客户端
UserSocialService:
protocol: tri
interface: "github.com.topfans.backend.pkg.proto.user.UserSocialService"
cluster: failover
loadbalance: random
# Asset Service 客户端
AssetService:
protocol: tri
interface: "github.com.topfans.backend.pkg.proto.asset.AssetService"
cluster: failover
loadbalance: random
# 超时配置
timeout: 5s