first commit
This commit is contained in:
44
config.example.yaml
Normal file
44
config.example.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
# 配置文件示例
|
||||
# 请将此文件复制为config.yaml并根据实际环境修改
|
||||
|
||||
# 服务器配置
|
||||
server:
|
||||
worker_id: 1 # 工作节点ID,用于雪花算法,范围0-1023
|
||||
|
||||
# 数据库配置
|
||||
mysql:
|
||||
max_open_conns: 100 # 最大打开连接数
|
||||
max_idle_conns: 20 # 最大空闲连接数
|
||||
conn_max_lifetime: "30m" # 连接最大生命周期
|
||||
|
||||
# Redis配置
|
||||
redis:
|
||||
db: 0 # Redis数据库编号
|
||||
pool_size: 10 # 连接池大小
|
||||
dial_timeout: "5s" # 拨号超时时间
|
||||
read_timeout: "3s" # 读取超时时间
|
||||
write_timeout: "3s" # 写入超时时间
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level: "info" # 日志级别:debug, info, warn, error, dpanic, panic, fatal
|
||||
development: true # 开发模式
|
||||
encoding: "console" # 日志编码:console, json
|
||||
output_paths: ["stdout"] # 输出路径
|
||||
error_output_paths: ["stderr"] # 错误输出路径
|
||||
|
||||
# 功能模块配置
|
||||
feature:
|
||||
# 阿里云短信服务配置
|
||||
sms:
|
||||
access_key_id: "your_access_key_id"
|
||||
access_key_secret: "your_access_key_secret"
|
||||
# 账户服务配置
|
||||
account:
|
||||
sms_credential:
|
||||
sign_name: "your_sign_name"
|
||||
template_code: "your_template_code"
|
||||
# NSQ配置
|
||||
nsq:
|
||||
topics:
|
||||
user_register: "user_register"
|
||||
Reference in New Issue
Block a user