BUILD 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. load(
  2. "@io_bazel_rules_go//proto:def.bzl",
  3. "go_proto_library",
  4. )
  5. load(
  6. "@io_bazel_rules_go//go:def.bzl",
  7. "go_library",
  8. "go_test",
  9. )
  10. package(default_visibility = ["//visibility:public"])
  11. filegroup(
  12. name = "package-srcs",
  13. srcs = glob(["**"]),
  14. tags = ["automanaged"],
  15. visibility = ["//visibility:private"],
  16. )
  17. filegroup(
  18. name = "all-srcs",
  19. srcs = [
  20. ":package-srcs",
  21. "//library/queue/databus/databusutil:all-srcs",
  22. "//library/queue/databus/metadata:all-srcs",
  23. "//library/queue/databus/report:all-srcs",
  24. ],
  25. tags = ["automanaged"],
  26. )
  27. go_library(
  28. name = "go_default_library",
  29. srcs = ["databus.go"],
  30. embed = [":databus_go_proto"],
  31. importpath = "go-common/library/queue/databus",
  32. tags = ["automanaged"],
  33. deps = [
  34. "//library/cache/redis:go_default_library",
  35. "//library/conf/env:go_default_library",
  36. "//library/container/pool:go_default_library",
  37. "//library/log:go_default_library",
  38. "//library/naming:go_default_library",
  39. "//library/naming/discovery:go_default_library",
  40. "//library/net/netutil:go_default_library",
  41. "//library/net/trace:go_default_library",
  42. "//library/stat/prom:go_default_library",
  43. "//library/time:go_default_library",
  44. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  45. "@com_github_gogo_protobuf//proto:go_default_library",
  46. ],
  47. )
  48. go_test(
  49. name = "go_default_xtest",
  50. srcs = ["databus_test.go"],
  51. tags = ["automanaged"],
  52. deps = [
  53. "//library/naming/discovery:go_default_library",
  54. "//library/queue/databus:go_default_library",
  55. "//library/time:go_default_library",
  56. ],
  57. )
  58. proto_library(
  59. name = "databus_proto",
  60. srcs = ["databus.proto"],
  61. tags = ["automanaged"],
  62. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  63. )
  64. go_proto_library(
  65. name = "databus_go_proto",
  66. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  67. importpath = "go-common/library/queue/databus",
  68. proto = ":databus_proto",
  69. tags = ["automanaged"],
  70. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  71. )