BUILD 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. "breaker_test.go",
  11. "sre_breaker_test.go",
  12. ],
  13. embed = [":go_default_library"],
  14. rundir = ".",
  15. tags = ["automanaged"],
  16. deps = [
  17. "//library/time:go_default_library",
  18. "//vendor/github.com/stretchr/testify/assert:go_default_library",
  19. ],
  20. )
  21. go_library(
  22. name = "go_default_library",
  23. srcs = [
  24. "breaker.go",
  25. "sre_breaker.go",
  26. ],
  27. importpath = "go-common/library/net/netutil/breaker",
  28. tags = ["automanaged"],
  29. visibility = ["//visibility:public"],
  30. deps = [
  31. "//library/ecode:go_default_library",
  32. "//library/log:go_default_library",
  33. "//library/stat/summary:go_default_library",
  34. "//library/time:go_default_library",
  35. ],
  36. )
  37. go_test(
  38. name = "go_default_xtest",
  39. srcs = ["example_test.go"],
  40. tags = ["automanaged"],
  41. deps = [
  42. "//library/net/netutil/breaker:go_default_library",
  43. "//library/time:go_default_library",
  44. ],
  45. )
  46. filegroup(
  47. name = "package-srcs",
  48. srcs = glob(["**"]),
  49. tags = ["automanaged"],
  50. visibility = ["//visibility:private"],
  51. )
  52. filegroup(
  53. name = "all-srcs",
  54. srcs = [":package-srcs"],
  55. tags = ["automanaged"],
  56. visibility = ["//visibility:public"],
  57. )