BUILD 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. load(
  2. "@io_bazel_rules_go//proto:def.bzl",
  3. "go_proto_library",
  4. )
  5. package(default_visibility = ["//visibility:public"])
  6. load(
  7. "@io_bazel_rules_go//go:def.bzl",
  8. "go_test",
  9. "go_library",
  10. )
  11. proto_library(
  12. name = "liverpc_proto",
  13. srcs = ["liverpc.proto"],
  14. tags = ["automanaged"],
  15. )
  16. go_proto_library(
  17. name = "liverpc_go_proto",
  18. compilers = ["@io_bazel_rules_go//proto:go_proto"],
  19. importpath = "go-common/library/net/rpc/liverpc",
  20. proto = ":liverpc_proto",
  21. tags = ["automanaged"],
  22. )
  23. go_test(
  24. name = "go_default_test",
  25. srcs = ["client_conn_test.go"],
  26. embed = [":go_default_library"],
  27. rundir = ".",
  28. tags = ["automanaged"],
  29. deps = [
  30. "//library/conf/env:go_default_library",
  31. "//library/net/metadata:go_default_library",
  32. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  33. ],
  34. )
  35. go_library(
  36. name = "go_default_library",
  37. srcs = [
  38. "client.go",
  39. "client_conn.go",
  40. "option.go",
  41. "protocol.go",
  42. ],
  43. embed = [":liverpc_go_proto"],
  44. importpath = "go-common/library/net/rpc/liverpc",
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:public"],
  47. deps = [
  48. "//library/conf/env:go_default_library",
  49. "//library/log:go_default_library",
  50. "//library/naming:go_default_library",
  51. "//library/naming/discovery:go_default_library",
  52. "//library/net/metadata:go_default_library",
  53. "//library/net/trace:go_default_library",
  54. "//library/stat:go_default_library",
  55. "//library/time:go_default_library",
  56. "//vendor/github.com/json-iterator/go:go_default_library",
  57. "//vendor/github.com/pkg/errors:go_default_library",
  58. "@com_github_gogo_protobuf//proto:go_default_library",
  59. "@com_github_golang_protobuf//proto:go_default_library",
  60. ],
  61. )
  62. filegroup(
  63. name = "package-srcs",
  64. srcs = glob(["**"]),
  65. tags = ["automanaged"],
  66. visibility = ["//visibility:private"],
  67. )
  68. filegroup(
  69. name = "all-srcs",
  70. srcs = [
  71. ":package-srcs",
  72. "//library/net/rpc/liverpc/context:all-srcs",
  73. "//library/net/rpc/liverpc/test:all-srcs",
  74. "//library/net/rpc/liverpc/testdata:all-srcs",
  75. ],
  76. tags = ["automanaged"],
  77. visibility = ["//visibility:public"],
  78. )