BUILD 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. package(default_visibility = ["//visibility:public"])
  7. filegroup(
  8. name = "package-srcs",
  9. srcs = glob(["**"]),
  10. tags = ["automanaged"],
  11. visibility = ["//visibility:private"],
  12. )
  13. filegroup(
  14. name = "all-srcs",
  15. srcs = [":package-srcs"],
  16. tags = ["automanaged"],
  17. )
  18. go_library(
  19. name = "go_default_library",
  20. srcs = [
  21. "discovery.go",
  22. "node_proc.go",
  23. "sql.go",
  24. "tidb.go",
  25. ],
  26. importpath = "go-common/library/database/tidb",
  27. tags = ["automanaged"],
  28. deps = [
  29. "//library/conf/env:go_default_library",
  30. "//library/log:go_default_library",
  31. "//library/naming:go_default_library",
  32. "//library/naming/discovery:go_default_library",
  33. "//library/net/netutil/breaker:go_default_library",
  34. "//library/net/trace:go_default_library",
  35. "//library/stat:go_default_library",
  36. "//library/time:go_default_library",
  37. "//vendor/github.com/go-sql-driver/mysql:go_default_library",
  38. "//vendor/github.com/pkg/errors:go_default_library",
  39. ],
  40. )
  41. go_test(
  42. name = "go_default_test",
  43. srcs = [
  44. "sql_test.go",
  45. "tidb_test.go",
  46. ],
  47. embed = [":go_default_library"],
  48. rundir = ".",
  49. tags = ["automanaged"],
  50. deps = [
  51. "//library/net/netutil/breaker:go_default_library",
  52. "//library/time:go_default_library",
  53. ],
  54. )