1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- environment = "test"
- name = "websocket"
- port = 10082
- [websocket]
- connectSize = 1024 # 控制消息 Channel 大小
- heartbeatWait = 120 # 心跳超时
- messageSize = 256 # 消息 channel 大小
- readBufferSize = 1024 # 读消息体最大的 buffersize
- readWait = 10 # 写超时
- writeBufferSize = 1024 # 写消息体最大的 buffersize
- writeWait = 10 # 读超时
- natsUrl = "nats://106.75.230.4:4333"
- [mysql]
- dsn = "root:9RKdJsEQKnjrni9R@tcp(10.23.148.10:3306)/sikey?charset=utf8mb4&parseTime=true&loc=Local"
- # Ignore ErrRecordNotFound error for logger
- skipDefaultTransaction = true
- # Slow SQL threshold
- slowThreshold = 600
- # Ignore ErrRecordNotFound error for logger
- ignoreRecordNotFoundError = true
- # 设置空闲连接池中连接的最大数量
- maxIdleConns = 10
- # 设置连接的有效时长 当 <= 0 时,连接永久保存,默认值时 0 。如果设置了 maxLifetime 会开启连接自动清理,
- # 清理的代码在 connectionCleaner 中, 它开启一个定时器,定时检查空闲连接池中的连接,超期的关闭连接。
- maxLifetime = -1
- # 设置打开数据库连接的最大数量。
- maxOpenConns = 100
- [redis]
- addr = "106.75.230.4:6379"
- channel = "message"
- connectKey = "connects"
- db = 0
- password = "sikey!Q@W#E456"
- [kafka]
- brokers = ["106.75.230.4:9092"]
- dualStack = true
- maxBytes = 10e6
- partition = 0
- timeout = 10
- topic = "messaging-channel"
- [log]
- path = "/var/logs/sikey/websocket"
- [auth]
- secret = "992443c835c347d6a8b7d046d0261671"
|