BUILD 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_test",
  5. "go_library",
  6. )
  7. go_test(
  8. name = "go_default_test",
  9. srcs = [
  10. "logging_test.go",
  11. "server_test.go",
  12. ],
  13. embed = [":go_default_library"],
  14. rundir = ".",
  15. tags = ["automanaged"],
  16. deps = [
  17. "//library/ecode:go_default_library",
  18. "//library/ecode/pb:go_default_library",
  19. "//library/ecode/tip:go_default_library",
  20. "//library/log:go_default_library",
  21. "//library/net/metadata:go_default_library",
  22. "//library/net/netutil/breaker:go_default_library",
  23. "//library/net/rpc/warden/proto/testproto:go_default_library",
  24. "//library/net/trace:go_default_library",
  25. "//library/time:go_default_library",
  26. "//vendor/github.com/pkg/errors:go_default_library",
  27. "//vendor/github.com/stretchr/testify/assert:go_default_library",
  28. "@com_github_golang_protobuf//ptypes:go_default_library_gen",
  29. "@org_golang_google_grpc//:go_default_library",
  30. "@org_golang_google_grpc//codes:go_default_library",
  31. "@org_golang_google_grpc//status:go_default_library",
  32. ],
  33. )
  34. go_library(
  35. name = "go_default_library",
  36. srcs = [
  37. "client.go",
  38. "logging.go",
  39. "recovery.go",
  40. "server.go",
  41. "stats.go",
  42. "validate.go",
  43. ],
  44. importpath = "go-common/library/net/rpc/warden",
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:public"],
  47. deps = [
  48. "//library/conf/dsn:go_default_library",
  49. "//library/conf/env:go_default_library",
  50. "//library/conf/flagvar:go_default_library",
  51. "//library/ecode:go_default_library",
  52. "//library/log:go_default_library",
  53. "//library/naming:go_default_library",
  54. "//library/naming/discovery:go_default_library",
  55. "//library/net/metadata:go_default_library",
  56. "//library/net/netutil/breaker:go_default_library",
  57. "//library/net/rpc/warden/balancer/wrr:go_default_library",
  58. "//library/net/rpc/warden/encoding/json:go_default_library",
  59. "//library/net/rpc/warden/resolver:go_default_library",
  60. "//library/net/rpc/warden/status:go_default_library",
  61. "//library/net/trace:go_default_library",
  62. "//library/stat:go_default_library",
  63. "//library/stat/summary:go_default_library",
  64. "//library/stat/sys/cpu:go_default_library",
  65. "//library/time:go_default_library",
  66. "//vendor/github.com/pkg/errors:go_default_library",
  67. "//vendor/gopkg.in/go-playground/validator.v9:go_default_library",
  68. "@org_golang_google_grpc//:go_default_library",
  69. "@org_golang_google_grpc//codes:go_default_library",
  70. "@org_golang_google_grpc//credentials:go_default_library",
  71. "@org_golang_google_grpc//keepalive:go_default_library",
  72. "@org_golang_google_grpc//metadata:go_default_library",
  73. "@org_golang_google_grpc//peer:go_default_library",
  74. "@org_golang_google_grpc//reflection:go_default_library",
  75. "@org_golang_google_grpc//status:go_default_library",
  76. ],
  77. )
  78. go_test(
  79. name = "go_default_xtest",
  80. srcs = ["exapmle_test.go"],
  81. tags = ["automanaged"],
  82. deps = [
  83. "//library/log:go_default_library",
  84. "//library/net/netutil/breaker:go_default_library",
  85. "//library/net/rpc/warden:go_default_library",
  86. "//library/net/rpc/warden/proto/testproto:go_default_library",
  87. "//library/time:go_default_library",
  88. "@org_golang_google_grpc//:go_default_library",
  89. ],
  90. )
  91. filegroup(
  92. name = "package-srcs",
  93. srcs = glob(["**"]),
  94. tags = ["automanaged"],
  95. visibility = ["//visibility:private"],
  96. )
  97. filegroup(
  98. name = "all-srcs",
  99. srcs = [
  100. ":package-srcs",
  101. "//library/net/rpc/warden/balancer/wrr:all-srcs",
  102. "//library/net/rpc/warden/benchmark/bench/client:all-srcs",
  103. "//library/net/rpc/warden/benchmark/bench/proto:all-srcs",
  104. "//library/net/rpc/warden/benchmark/bench/server:all-srcs",
  105. "//library/net/rpc/warden/benchmark/helloworld/client:all-srcs",
  106. "//library/net/rpc/warden/benchmark/helloworld/server:all-srcs",
  107. "//library/net/rpc/warden/encoding/json:all-srcs",
  108. "//library/net/rpc/warden/examples/client:all-srcs",
  109. "//library/net/rpc/warden/examples/grpcDebug:all-srcs",
  110. "//library/net/rpc/warden/examples/server:all-srcs",
  111. "//library/net/rpc/warden/metadata:all-srcs",
  112. "//library/net/rpc/warden/proto/testproto:all-srcs",
  113. "//library/net/rpc/warden/resolver:all-srcs",
  114. "//library/net/rpc/warden/status:all-srcs",
  115. ],
  116. tags = ["automanaged"],
  117. visibility = ["//visibility:public"],
  118. )