BUILD.bazel 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. go_library(
  7. name = "go_default_library",
  8. srcs = ["interceptor.go"],
  9. importpath = "go-common/library/net/rpc/interceptor",
  10. tags = ["automanaged"],
  11. visibility = ["//visibility:public"],
  12. deps = [
  13. "//library/ecode:go_default_library",
  14. "//library/log:go_default_library",
  15. "//library/net/rpc/context:go_default_library",
  16. "//library/stat:go_default_library",
  17. "//vendor/golang.org/x/time/rate:go_default_library",
  18. ],
  19. )
  20. go_test(
  21. name = "go_default_test",
  22. srcs = ["interceptor_test.go"],
  23. embed = [":go_default_library"],
  24. rundir = ".",
  25. tags = ["automanaged"],
  26. deps = [
  27. "//library/ecode:go_default_library",
  28. "//library/net/rpc/context:go_default_library",
  29. "//vendor/golang.org/x/time/rate:go_default_library",
  30. ],
  31. )
  32. filegroup(
  33. name = "package-srcs",
  34. srcs = glob(["**"]),
  35. tags = ["automanaged"],
  36. visibility = ["//visibility:private"],
  37. )
  38. filegroup(
  39. name = "all-srcs",
  40. srcs = [":package-srcs"],
  41. tags = ["automanaged"],
  42. visibility = ["//visibility:public"],
  43. )