Files
smart-go/configs/config.yml.example
2026-04-23 18:58:13 +08:00

40 lines
905 B
Plaintext
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.
server:
http:
addr: "0.0.0.0:8000"
timeout: 10s
grpc:
addr: "0.0.0.0:9000"
timeout: 10s
data:
database:
driver: postgres # mysql, postgres, sqlite
dsn: postgres://root:123456@127.0.0.1:5432/smart?sslmode=disable
redis:
# standalone | sentinel | cluster
mode: standalone
addrs:
- 127.0.0.1:6379
password: machine03
db: 3
pool_size: 100
idle_timeout: 10s
max_retries: 3
retry_delay: 1s
retry_max_delay: 10s
# 哨兵示例(mode: sentineladdrs 为 Sentinel 地址列表):
# mode: sentinel
# master_name: mymaster
# addrs:
# - 127.0.0.1:26379
# - 127.0.0.1:26380
# password: ""
# db: 0
# 集群示例(mode: clusteraddrs 为若干节点种子地址):
# mode: cluster
# addrs:
# - 127.0.0.1:7000
# - 127.0.0.1:7001
# - 127.0.0.1:7002
# password: ""