123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- environment = "release"
- name = "websocket"
- port = 10082
- [websocket]
- connectSize = 1024 # 控制消息 Channel 大小
- heartbeatWait = 360 # 心跳超时 6min=360s
- messageSize = 256 # 消息 channel 大小
- readBufferSize = 1024 # 读消息体最大的 buffersize
- readWait = 60 # 读超时, 首次心跳事件 1min=60s
- writeBufferSize = 1024 # 写消息体最大的 buffersize
- writeWait = 10 # 写超时
- natsUrl = "nats://10.29.40.221:4333"
- [mysql]
- dsn = "root:7QJARDvYLkkYZGnw@tcp(10.29.113.11:3306)/w303b?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 = "10.29.40.221: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"
- secret = "15330b13e194429b9c4f1c4a19937357"
|