BUILD 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 = ["wrr_test.go"],
  10. embed = [":go_default_library"],
  11. rundir = ".",
  12. tags = ["automanaged"],
  13. deps = [
  14. "//library/net/metadata:go_default_library",
  15. "//library/net/rpc/warden/metadata:go_default_library",
  16. "@org_golang_google_grpc//balancer:go_default_library",
  17. "@org_golang_google_grpc//resolver:go_default_library",
  18. ],
  19. )
  20. go_library(
  21. name = "go_default_library",
  22. srcs = ["wrr.go"],
  23. importpath = "go-common/library/net/rpc/warden/balancer/wrr",
  24. tags = ["automanaged"],
  25. visibility = ["//visibility:public"],
  26. deps = [
  27. "//library/log:go_default_library",
  28. "//library/net/metadata:go_default_library",
  29. "//library/net/rpc/warden/metadata:go_default_library",
  30. "//library/stat/summary:go_default_library",
  31. "@org_golang_google_grpc//:go_default_library",
  32. "@org_golang_google_grpc//balancer:go_default_library",
  33. "@org_golang_google_grpc//balancer/base:go_default_library",
  34. "@org_golang_google_grpc//codes:go_default_library",
  35. "@org_golang_google_grpc//metadata:go_default_library",
  36. "@org_golang_google_grpc//resolver:go_default_library",
  37. "@org_golang_google_grpc//status:go_default_library",
  38. ],
  39. )
  40. filegroup(
  41. name = "package-srcs",
  42. srcs = glob(["**"]),
  43. tags = ["automanaged"],
  44. visibility = ["//visibility:private"],
  45. )
  46. filegroup(
  47. name = "all-srcs",
  48. srcs = [
  49. ":package-srcs",
  50. "//library/net/rpc/warden/balancer/wrr/test:all-srcs",
  51. ],
  52. tags = ["automanaged"],
  53. visibility = ["//visibility:public"],
  54. )