coupon-service.toml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # This is a TOML document. Boom
  2. version = "1.0.0"
  3. user = "nobody"
  4. pid = "/tmp/coupon.pid"
  5. dir = "./"
  6. [log]
  7. stdout = true
  8. [bm]
  9. timeout = "1s"
  10. [property]
  11. messageURL = "http://message.bilibili.com"
  12. captchaBID = "account"
  13. captchaTokenURL = "http://api.bilibili.co/x/internal/v1/captcha/token"
  14. captchaVerifyURL = "http://api.bilibili.co/x/internal/v1/captcha/verify"
  15. [platform]
  16. 1 = "iPhone"
  17. # 2 = "iPad"
  18. # 3 = "网页"
  19. # 4 = "Android"
  20. # 5 = "iPad HD"
  21. # 6 = "iOS概念版"
  22. # 7 = "安卓概念版"
  23. # 8 = "微信公众号"
  24. # 9 = "赠送好友"
  25. [identify]
  26. whiteAccessKey = ""
  27. whiteMid = 0
  28. [identify.app]
  29. key = "6a29f8ed87407c11"
  30. secret = "d3c5a85f5b895a03735b5d20a273bc57"
  31. [identify.memcache]
  32. name = "go-business/identify"
  33. proto = "tcp"
  34. addr = "172.16.33.54:11211"
  35. active = 5
  36. idle = 3
  37. dialTimeout = "1s"
  38. readTimeout = "1s"
  39. writeTimeout = "1s"
  40. idleTimeout = "80s"
  41. [identify.host]
  42. auth = "http://passport.bilibili.com"
  43. secret = "http://open.bilibili.com"
  44. [identify.httpClient]
  45. key = "f022126a8a365e20"
  46. secret = "b7b86838145d634b487e67b811b8fab2"
  47. dial = "30ms"
  48. timeout = "100ms"
  49. keepAlive = "60s"
  50. [identify.httpClient.breaker]
  51. window = "10s"
  52. sleep = "100ms"
  53. bucket = 10
  54. ratio = 0.5
  55. request = 100
  56. [identify.httpClient.url]
  57. "http://passport.bilibili.co/intranet/auth/tokenInfo" = {timeout = "100ms"}
  58. "http://passport.bilibili.co/intranet/auth/cookieInfo" = {timeout = "100ms"}
  59. "http://open.bilibili.co/api/getsecret" = {timeout = "500ms"}
  60. [mysql]
  61. addr = "127.0.0.1:3306"
  62. dsn = "root:123456@tcp(127.0.0.1:3306)/bilibili_coupon?timeout=2s&readTimeout=2s&writeTimeout=2s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  63. active = 20
  64. idle = 10
  65. idleTimeout ="4h"
  66. queryTimeout = "1s"
  67. execTimeout = "1s"
  68. tranTimeout = "2s"
  69. [mysql.breaker]
  70. window = "3s"
  71. sleep = "100ms"
  72. bucket = 10
  73. ratio = 0.5
  74. request = 100
  75. [vipMysql]
  76. addr = "172.16.33.205"
  77. dsn = "zhaozhihao:MN9havOfnzY3kd6L78IVucRxgywe0p2P@tcp(172.16.33.205:3308)/bilibili_vip?timeout=5s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
  78. active = 5
  79. idle = 5
  80. IdleTimeout ="4h"
  81. QueryTimeout = "5s"
  82. ExecTimeout = "5s"
  83. TranTimeout = "5s"
  84. [vipMysql.breaker]
  85. window = "3s"
  86. sleep = "100ms"
  87. bucket = 10
  88. ratio = 0.5
  89. request = 100
  90. [memcache]
  91. name = "coupon"
  92. proto = "tcp"
  93. addr = "172.18.33.60:11237"
  94. idle = 5
  95. active = 10
  96. dialTimeout = "1s"
  97. readTimeout = "1s"
  98. writeTimeout = "1s"
  99. idleTimeout = "10s"
  100. expire = "24h"
  101. prizeExpire = "30h"
  102. [rpcServer]
  103. proto = "tcp"
  104. addr = "0.0.0.0:6869"
  105. weight = 10
  106. [httpClient]
  107. key = "f022126a8a365e20"
  108. secret = "b7b86838145d634b487e67b811b8fab2"
  109. dial = "30ms"
  110. timeout = "300ms"
  111. keepAlive = "60s"
  112. [httpClient.breaker]
  113. window = "10s"
  114. sleep = "100ms"
  115. bucket = 10
  116. ratio = 0.5
  117. request = 100
  118. [vipinfoRPC]
  119. timeout = "3s"
  120. [newYearConf]
  121. # 活动id
  122. actID = 1
  123. # 2019年1月1日00:00:00
  124. startTime = 1545797400
  125. # 2019年1月14日23:59:59
  126. endTime = 1545883800
  127. # 随机
  128. randNum = 5
  129. # 历史从未充值过大会员
  130. noVipBatchToken1 = "210957721620181224153121"
  131. noVipBatchToken3 = "850691829320181224153235"
  132. noVipBatchToken12 = "798157449920181224153338"
  133. # 年度大会员且还有180天以上才到期
  134. more180BatchToken1 = "763272400820181225165235"
  135. more180BatchToken3 = "947668794420181225165208"
  136. more180BatchToken12 = "115331401920181225165136"
  137. # 年度大会员且还有180天(含)以内才到期
  138. less180BatchToken1 = "234526007120181224153625"
  139. less180BatchToken3 = "231042916920181224153654"
  140. less180BatchToken12 = "862417541120181224153722"
  141. # 月度会员(包括连续包月)& 大会员过期
  142. monthBatchToken1 = "360059523020181224153817"
  143. monthBatchToken3 = "425909138520181224153843"
  144. monthBatchToken12 = "3557982522201812241509"
  145. [wardenServer]
  146. addr = "0.0.0.0:9000"
  147. timeout = "1s"