websocket.toml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. environment = "dev"
  2. name = "websocket"
  3. port = 10082
  4. [websocket]
  5. connectSize = 1024 # 控制消息 Channel 大小
  6. heartbeatWait = 120 # 心跳超时
  7. messageSize = 256 # 消息 channel 大小
  8. natsUrl = "nats://106.75.230.4:4333"
  9. readBufferSize = 1024 # 读消息体最大的 buffersize
  10. readWait = 20 # 读超时
  11. writeBufferSize = 1024 # 写消息体最大的 buffersize
  12. writeWait = 10 # 写超时
  13. [mysql]
  14. # dsn = "root:qq123123@tcp(127.0.0.1:3306)/sikey?charset=utf8mb4&parseTime=true&loc=Local"
  15. dsn = "root:9RKdJsEQKnjrni9R@tcp(10.23.148.10:3306)/sikey?charset=utf8mb4&parseTime=true&loc=Local"
  16. ssh = true
  17. # Ignore ErrRecordNotFound error for logger
  18. skipDefaultTransaction = true
  19. # Slow SQL threshold
  20. slowThreshold = 600
  21. # Ignore ErrRecordNotFound error for logger
  22. ignoreRecordNotFoundError = true
  23. # 设置空闲连接池中连接的最大数量
  24. maxIdleConns = 10
  25. # 设置连接的有效时长 当 <= 0 时,连接永久保存,默认值时 0 。如果设置了 maxLifetime 会开启连接自动清理,
  26. # 清理的代码在 connectionCleaner 中, 它开启一个定时器,定时检查空闲连接池中的连接,超期的关闭连接。
  27. maxLifetime = -1
  28. # 设置打开数据库连接的最大数量。
  29. maxOpenConns = 100
  30. [redis]
  31. addr = "106.75.230.4:6379"
  32. channel = "message"
  33. connectKey = "connects"
  34. db = 0
  35. password = "sikey!Q@W#E456"
  36. [kafka]
  37. brokers = ["106.75.230.4:9092"]
  38. dualStack = true
  39. maxBytes = 10e6
  40. partition = 0
  41. timeout = 10
  42. topic = "messaging-channel"
  43. [logger]
  44. encoder = "console"
  45. # [logger.sls]
  46. # accessKeyId = "LTAI5tMWjYSHsq3S57pyu2JX"
  47. # accessKeySecret = "08aBmJYTtW1VJX1sffUmFwSNvJnN58"
  48. # endpoint = "cn-shanghai.log.aliyuncs.com"
  49. # logStoreName = "w303b"
  50. # projectName = "w303b-test"
  51. # sourceIp = "106.75.230.4"
  52. # topic = "test"
  53. [auth]
  54. secret = "992443c835c347d6a8b7d046d0261671"