conf.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package databus
  2. import (
  3. "time"
  4. "go-common/library/conf/env"
  5. "go-common/library/queue/databus"
  6. xtime "go-common/library/time"
  7. )
  8. type conf struct {
  9. Key string
  10. Secret string
  11. Addr string
  12. }
  13. var (
  14. _defaultAddrConfig = map[string]*conf{
  15. env.DeployEnvUat: {
  16. Key: "4c76cbb7a985ac90",
  17. Secret: "43bb22ce34a6b13e7814f09cb8116522",
  18. Addr: "172.18.33.50:6205",
  19. },
  20. env.DeployEnvPre: {
  21. Key: "4c76cbb7a985ac90",
  22. Secret: "8c22a196bf00d623b69cba4e61b1f7dc",
  23. Addr: "172.18.21.90:6205",
  24. },
  25. env.DeployEnvProd: {
  26. Key: "4c76cbb7a985ac90",
  27. Secret: "8c22a196bf00d623b69cba4e61b1f7dc",
  28. Addr: "172.18.21.90:6205",
  29. },
  30. }
  31. _defaultConfig = &databus.Config{
  32. Key: "0PtMsLLxWyyvoTgAyLCD",
  33. Secret: "0PtMsLLxWyyvoTgAyLCE",
  34. Group: "AegisResource-MainArchive-P",
  35. Topic: "AegisResource-T",
  36. Action: "pub",
  37. Buffer: 10240,
  38. Name: "aegis-admin/databus",
  39. Proto: "tcp",
  40. Addr: "172.16.33.158:6205",
  41. Active: 100,
  42. Idle: 10,
  43. DialTimeout: xtime.Duration(time.Millisecond * 200),
  44. ReadTimeout: xtime.Duration(time.Millisecond * 200),
  45. WriteTimeout: xtime.Duration(time.Millisecond * 200),
  46. IdleTimeout: xtime.Duration(time.Second * 80),
  47. }
  48. )