BUILD 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 = ["discovery_test.go"],
  10. embed = [":go_default_library"],
  11. rundir = ".",
  12. tags = ["automanaged"],
  13. deps = [
  14. "//library/conf/env:go_default_library",
  15. "//library/ecode:go_default_library",
  16. "//library/exp/feature:go_default_library",
  17. "//library/naming:go_default_library",
  18. "//library/net/http/blademaster:go_default_library",
  19. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  20. ],
  21. )
  22. go_library(
  23. name = "go_default_library",
  24. srcs = [
  25. "discovery.go",
  26. "shuffle.go",
  27. ],
  28. importpath = "go-common/library/naming/discovery",
  29. tags = ["automanaged"],
  30. deps = [
  31. "//library/conf/env:go_default_library",
  32. "//library/ecode:go_default_library",
  33. "//library/exp/feature:go_default_library",
  34. "//library/log:go_default_library",
  35. "//library/naming:go_default_library",
  36. "//library/net/http/blademaster:go_default_library",
  37. "//library/net/netutil:go_default_library",
  38. "//library/net/netutil/breaker:go_default_library",
  39. "//library/time:go_default_library",
  40. "//library/xstr:go_default_library",
  41. ],
  42. )
  43. go_test(
  44. name = "go_default_xtest",
  45. srcs = ["example_test.go"],
  46. tags = ["automanaged"],
  47. deps = [
  48. "//library/naming:go_default_library",
  49. "//library/naming/discovery:go_default_library",
  50. ],
  51. )
  52. filegroup(
  53. name = "package-srcs",
  54. srcs = glob(["**"]),
  55. tags = ["automanaged"],
  56. visibility = ["//visibility:private"],
  57. )
  58. filegroup(
  59. name = "all-srcs",
  60. srcs = [":package-srcs"],
  61. tags = ["automanaged"],
  62. visibility = ["//visibility:public"],
  63. )