load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "stream", srcs = [ "decode_kv.go", "meta_kv.go", "rewrite_meta_rawkv.go", "search.go", "stream_metas.go", "stream_mgr.go", "stream_status.go", "util.go", ], importpath = "github.com/pingcap/tidb/br/pkg/stream", visibility = ["//visibility:public"], deps = [ "//br/pkg/encryption", "//br/pkg/errors", "//br/pkg/glue", "//br/pkg/httputil", "//br/pkg/logutil", "//br/pkg/restore/ingestrec", "//br/pkg/restore/tiflashrec", "//br/pkg/storage", "//br/pkg/streamhelper", "//br/pkg/utils/iter", "//pkg/ddl", "//pkg/kv", "//pkg/meta", "//pkg/meta/model", "//pkg/tablecodec", "//pkg/util", "//pkg/util/codec", "//pkg/util/mathutil", "//pkg/util/table-filter", "@com_github_docker_go_units//:go-units", "@com_github_fatih_color//:color", "@com_github_klauspost_compress//zstd", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_pingcap_kvproto//pkg/encryptionpb", "@com_github_pingcap_kvproto//pkg/metapb", "@com_github_pingcap_log//:log", "@com_github_tikv_client_go_v2//oracle", "@com_github_tikv_pd_client//:client", "@org_golang_x_sync//errgroup", "@org_uber_go_multierr//:multierr", "@org_uber_go_zap//:zap", ], ) go_test( name = "stream_test", timeout = "short", srcs = [ "decode_kv_test.go", "meta_kv_test.go", "rewrite_meta_rawkv_test.go", "search_test.go", "stream_metas_test.go", "stream_misc_test.go", "util_test.go", ], embed = [":stream"], flaky = True, shard_count = 45, deps = [ "//br/pkg/storage", "//br/pkg/streamhelper", "//pkg/ddl", "//pkg/meta", "//pkg/meta/model", "//pkg/parser/ast", "//pkg/parser/model", "//pkg/parser/mysql", "//pkg/tablecodec", "//pkg/types", "//pkg/util/codec", "//pkg/util/intest", "//pkg/util/table-filter", "@com_github_fsouza_fake_gcs_server//fakestorage", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_pingcap_log//:log", "@com_github_stretchr_testify//require", "@com_github_tikv_client_go_v2//oracle", "@org_golang_x_exp//maps", "@org_uber_go_zap//:zap", ], )