typ.go 854 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2020 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. /**
  4. * @Author: mac
  5. * @Description:
  6. * @Date: 2020/3/25 10:06
  7. */
  8. package trace
  9. import "strings"
  10. var (
  11. RedisSet = "REDIS:SET"
  12. RedisSetEx = "REDIS:SETEX"
  13. RedisGet = "REDIS:GET"
  14. RedisSadd = "REDIS:SADD"
  15. RedisZadd = "REDIS:ZADD"
  16. RedisExpire = "REDIS:EXPIRE"
  17. RedisZcard = "REDIS:ZCARD"
  18. RedisDel = "REDIS:DEL"
  19. SetNxEx = "REDIS:SetNxEx"
  20. )
  21. // 方法调用
  22. func FuncCall(operateName string) string {
  23. return "Func:" + operateName
  24. }
  25. // 第三方http调用
  26. func ThirdPartyHttp(method, operateName string) string {
  27. return "ThirdPartyHttp:" + strings.ToUpper(method) + ":" + operateName
  28. }
  29. func ThirdPartyHttps(method, operateName string) string {
  30. return "ThirdPartyHttps:" + strings.ToUpper(method) + ":" + operateName
  31. }