local.toml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. [mysql]
  2. addr = "127.0.0.1:3306"
  3. dsn = "root:123456@tcp(127.0.0.1:3306)/live_resource?timeout=2000ms&readTimeout=2000ms&writeTimeout=2000ms&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  4. readDSN = ["root:123456@tcp(127.0.0.1:3306)/live_resource?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8,utf8mb4","root:123456@tcp(127.0.0.1:3306)/live_resource?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8,utf8mb4"]
  5. active = 20
  6. idle = 10
  7. idleTimeout ="4h"
  8. queryTimeout = "1s"
  9. execTimeout = "1s"
  10. tranTimeout = "1s"
  11. [memcache]
  12. name = "app.service/resource"
  13. proto = "tcp"
  14. addr = "127.0.0.1:11211"
  15. idle = 10
  16. active = 10
  17. dialTimeout = "2s"
  18. readTimeout = "2s"
  19. writeTimeout = "2s"
  20. idleTimeout = "7h"
  21. expire = "24h"
  22. confKvExpire = "24h"
  23. [db]
  24. [db.resource]
  25. dsn = "root:123456@tcp(127.0.0.1:3306)/live_resource?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  26. active = 5
  27. idle = 1
  28. idleTimeout = "4h"
  29. # 从库
  30. [db.resourceReader]
  31. dsn = "root:123456@tcp(127.0.0.1:3306)/live_resource?timeout=200ms&readTimeout=200ms&writeTimeout=200ms&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  32. active = 5
  33. idle = 1
  34. idleTimeout = "4h"