load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "etcd", srcs = ["etcd.go"], importpath = "github.com/pingcap/tidb/pkg/util/etcd", visibility = ["//visibility:public"], deps = [ "//pkg/config", "//pkg/keyspace", "//pkg/kv", "//pkg/lightning/common", "//pkg/metaservice", "//pkg/metrics", "@com_github_pingcap_errors//:errors", "@com_github_tikv_client_go_v2//tikv", "@com_github_tikv_client_go_v2//util/grpcutil", "@com_github_tikv_pd_client//:client", "@io_etcd_go_etcd_client_v3//:client", "@io_etcd_go_etcd_client_v3//namespace", "@org_golang_google_grpc//:grpc", "@org_golang_google_grpc//backoff", "@org_golang_google_grpc//keepalive", "@org_uber_go_zap//:zap", ], ) go_test( name = "etcd_test", timeout = "short", srcs = ["etcd_test.go"], embed = [":etcd"], flaky = True, deps = [ "@com_github_pingcap_errors//:errors", "@com_github_stretchr_testify//require", "@io_etcd_go_etcd_client_v3//:client", "@io_etcd_go_etcd_tests_v3//integration", ], )