topfans/backend/services/notificationService/configs/config.yaml
2026-06-16 21:30:58 +08:00

69 lines
1.7 KiB
YAML
Raw 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.

# Notification Service 配置文件
# 当前阶段服务使用编程式直连main.go 中通过 flag/env 传入地址),此文件仅作占位。
# 后续引入 Nacos 服务注册中心后,取消注释并在 main.go 中调用 config.Load() 加载此文件。
# 服务配置
service:
name: notification-service
version: 1.0.0
port: 20010 # Notification Service 端口
# 数据库配置
database:
host: localhost
port: 5432
user: postgres
password: ""
dbname: top-fans
sslmode: disable
timezone: Asia/Shanghai
schema: public
# 日志配置
logging:
level: info
encoding: json
output_paths:
- stdout
dubbo:
# 应用配置
application:
name: notification-service
version: 1.0.0
# 注册中心配置(暂未启用,后续接入 Nacos 时取消注释)
# registries:
# nacos:
# protocol: nacos
# address: 127.0.0.1:8848
# timeout: 5s
# 协议配置
protocols:
triple:
name: tri
port: 20010 # Notification Service 端口
# Provider 配置
provider:
# registry-ids: nacos # 接入 Nacos 后取消注释
protocol-ids: triple
services:
NotificationService:
interface: "github.com.topfans.backend.pkg.proto.notification.NotificationService"
# 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
# 超时配置
timeout: 5s