BUILD 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. package(default_visibility = ["//visibility:public"])
  7. filegroup(
  8. name = "package-srcs",
  9. srcs = glob(["**"]),
  10. tags = ["automanaged"],
  11. visibility = ["//visibility:private"],
  12. )
  13. filegroup(
  14. name = "all-srcs",
  15. srcs = [
  16. ":package-srcs",
  17. "//library/net/rpc/context:all-srcs",
  18. "//library/net/rpc/interceptor:all-srcs",
  19. "//library/net/rpc/liverpc:all-srcs",
  20. "//library/net/rpc/warden:all-srcs",
  21. ],
  22. tags = ["automanaged"],
  23. )
  24. go_library(
  25. name = "go_default_library",
  26. srcs = [
  27. "balancer.go",
  28. "client.go",
  29. "client2.go",
  30. "server.go",
  31. "trace.go",
  32. ],
  33. importpath = "go-common/library/net/rpc",
  34. tags = ["automanaged"],
  35. deps = [
  36. "//library/conf/dsn:go_default_library",
  37. "//library/conf/env:go_default_library",
  38. "//library/ecode:go_default_library",
  39. "//library/log:go_default_library",
  40. "//library/naming:go_default_library",
  41. "//library/naming/discovery:go_default_library",
  42. "//library/net/metadata:go_default_library",
  43. "//library/net/netutil/breaker:go_default_library",
  44. "//library/net/rpc/context:go_default_library",
  45. "//library/net/rpc/interceptor:go_default_library",
  46. "//library/net/trace:go_default_library",
  47. "//library/stat:go_default_library",
  48. "//library/sync/errgroup:go_default_library",
  49. "//library/time:go_default_library",
  50. "//vendor/github.com/pkg/errors:go_default_library",
  51. ],
  52. )
  53. go_test(
  54. name = "go_default_test",
  55. srcs = [
  56. "breaker_test.go",
  57. "client2_test.go",
  58. "server_test.go",
  59. ],
  60. embed = [":go_default_library"],
  61. rundir = ".",
  62. tags = ["automanaged"],
  63. deps = [
  64. "//library/conf/env:go_default_library",
  65. "//library/ecode:go_default_library",
  66. "//library/log:go_default_library",
  67. "//library/naming:go_default_library",
  68. "//library/naming/discovery:go_default_library",
  69. "//library/net/rpc/context:go_default_library",
  70. "//library/time:go_default_library",
  71. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  72. ],
  73. )