1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- environment: debug
- auth:
- server_auth_secret: "992443c835c347d6a8b7d046d0261671"
- logger:
- filename: "/var/log/sikey/servers.log" # 日志文件路径
- max_size: 500 # 每个日志文件的最大大小(以MB为单位)
- max_backups: 3 # 保留的旧日志文件的最大数量
- max_age: 28 # 最多保留的天数
- compress: true # 是否压缩旧日志文件
- websocket:
- connect_size: 1024 # 控制消息 Channel 大小
- heartbeat_wait: 120 # 心跳超时
- message_size: 256 # 消息 channel 大小
- nats_url: "nats://106.75.230.4:4333"
- read_buffer_size: 1024 # 读消息体最大的 buffer size
- read_wait: 20 # 读超时
- write_buffer_size: 1024 # 写消息体最大的 buffer size
- write_wait: 10 # 写超时
- # mysql connection config
- mysql:
- dsn: "root:9RKdJsEQKnjrni9R@tcp(10.23.148.10:3306)/sikey?charset=utf8mb4&parseTime=true&loc=Local"
- ignore_record_not_found_error: true # Ignore ErrRecordNotFound error for logger
- max_idle_conns: 1000 # 设置空闲连接池中连接的最大数量
- skip_default_transaction: true # Ignore ErrRecordNotFound error for logger
- slow_threshold: 600 # Slow SQL threshold
- # 设置连接的有效时长 当 <= 0 时,连接永久保存,默认值时 0 。如果设置了 maxLifetime 会开启连接自动清理,
- # 清理的代码在 connectionCleaner 中, 它开启一个定时器,定时检查空闲连接池中的连接,超期的关闭连接。
- max_lifetime: -1
- max_open_conns: 100 # 设置打开数据库连接的最大数量。
- ssh: true
- user: "root"
- password: "RHTUH2z49aEXnsgz"
- hostname: "106.75.230.4:22"
- # redis connection config
- redis:
- addr: "106.75.230.4:6379"
- # REDIS_CHANNEL: 'message'
- connect_key: "connects"
- db: 0
- password: "sikey!Q@W#E456"
- # nats connection config
- nats:
- addr: "nats://106.75.230.4:4333"
- subject: "clients.message" # 消息通道
|