Files
junhong_cmp_fiber/configs/config.yaml

42 lines
794 B
YAML

server:
address: ":3000"
read_timeout: "10s"
write_timeout: "10s"
shutdown_timeout: "30s"
prefork: false
redis:
address: "cxd.whcxd.cn"
password: "cpNbWtAaqgo1YJmbMp3h"
port: 16299
db: 0
pool_size: 10
min_idle_conns: 5
dial_timeout: "5s"
read_timeout: "3s"
write_timeout: "3s"
logging:
level: "info"
development: false
app_log:
filename: "logs/app.log"
max_size: 100 # MB
max_backups: 30
max_age: 30 # 天
compress: true
access_log:
filename: "logs/access.log"
max_size: 500 # MB
max_backups: 90
max_age: 90 # 天
compress: true
middleware:
enable_auth: true
enable_rate_limiter: false # 默认禁用
rate_limiter:
max: 100 # 请求数
expiration: "1m" # 每分钟
storage: "memory" # 或 "redis"