websocket.release.toml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. environment = "release"
  2. name = "websocket"
  3. port = 10082
  4. [websocket]
  5. connectSize = 1024 # 控制消息 Channel 大小
  6. heartbeatWait = 360 # 心跳超时 6min=360s
  7. messageSize = 256 # 消息 channel 大小
  8. readBufferSize = 1024 # 读消息体最大的 buffersize
  9. readWait = 60 # 读超时, 首次心跳事件 1min=60s
  10. writeBufferSize = 1024 # 写消息体最大的 buffersize
  11. writeWait = 10 # 写超时
  12. natsUrl = "nats://10.29.40.221:4333"
  13. [mysql]
  14. dsn = "root:7QJARDvYLkkYZGnw@tcp(10.29.113.11:3306)/w303b?charset=utf8mb4&parseTime=true&loc=Local"
  15. # Ignore ErrRecordNotFound error for logger
  16. skipDefaultTransaction = true
  17. # Slow SQL threshold
  18. slowThreshold = 600
  19. # Ignore ErrRecordNotFound error for logger
  20. ignoreRecordNotFoundError = true
  21. # 设置空闲连接池中连接的最大数量
  22. maxIdleConns = 10
  23. # 设置连接的有效时长 当 <= 0 时,连接永久保存,默认值时 0 。如果设置了 maxLifetime 会开启连接自动清理,
  24. # 清理的代码在 connectionCleaner 中, 它开启一个定时器,定时检查空闲连接池中的连接,超期的关闭连接。
  25. maxLifetime = -1
  26. # 设置打开数据库连接的最大数量。
  27. maxOpenConns = 100
  28. [redis]
  29. addr = "10.29.40.221:6379"
  30. channel = "message"
  31. connectKey = "connects"
  32. db = 0
  33. password = "sikey!Q@W#E456"
  34. #[kafka]
  35. #brokers = ["106.75.230.4:9092"]
  36. #dualStack = true
  37. #maxBytes = 10e6
  38. #partition = 0
  39. #timeout = 10
  40. #topic = "messaging-channel"
  41. [log]
  42. path = "/var/logs/sikey/websocket"
  43. [auth]
  44. #secret = "992443c835c347d6a8b7d046d0261671"
  45. secret = "15330b13e194429b9c4f1c4a19937357"