load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "external", srcs = [ "byte_reader.go", "codec.go", "concurrent_reader.go", "engine.go", "file.go", "iter.go", "kv_reader.go", "merge.go", "merge_v2.go", "onefile_writer.go", "reader.go", "split.go", "stat_reader.go", "testutil.go", "util.go", "writer.go", ], importpath = "github.com/pingcap/tidb/pkg/lightning/backend/external", visibility = ["//visibility:public"], deps = [ "//br/pkg/membuf", "//br/pkg/storage", "//pkg/kv", "//pkg/lightning/backend", "//pkg/lightning/backend/encode", "//pkg/lightning/backend/kv", "//pkg/lightning/common", "//pkg/lightning/log", "//pkg/metrics", "//pkg/util", "//pkg/util/hack", "//pkg/util/logutil", "//pkg/util/mathutil", "//pkg/util/size", "@com_github_aws_aws_sdk_go//aws", "@com_github_docker_go_units//:go-units", "@com_github_google_uuid//:uuid", "@com_github_jfcg_sorty_v2//:sorty", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_prometheus_client_golang//prometheus", "@com_github_stretchr_testify//require", "@org_golang_x_sync//errgroup", "@org_uber_go_atomic//:atomic", "@org_uber_go_zap//:zap", "@org_uber_go_zap//zapcore", ], ) go_test( name = "external_test", timeout = "short", srcs = [ "bench_test.go", "byte_reader_test.go", "codec_test.go", "concurrent_reader_test.go", "engine_test.go", "file_test.go", "iter_test.go", "merge_test.go", "misc_bench_test.go", "onefile_writer_test.go", "reader_test.go", "sort_test.go", "split_test.go", "util_test.go", "writer_test.go", ], embed = [":external"], flaky = True, shard_count = 50, deps = [ "//br/pkg/membuf", "//br/pkg/storage", "//pkg/kv", "//pkg/lightning/backend/kv", "//pkg/lightning/common", "//pkg/lightning/config", "//pkg/lightning/log", "//pkg/util/intest", "//pkg/util/logutil", "//pkg/util/size", "@com_github_aws_aws_sdk_go//aws", "@com_github_aws_aws_sdk_go//aws/credentials", "@com_github_aws_aws_sdk_go//aws/session", "@com_github_aws_aws_sdk_go//service/s3", "@com_github_docker_go_units//:go-units", "@com_github_felixge_fgprof//:fgprof", "@com_github_google_uuid//:uuid", "@com_github_jfcg_sorty_v2//:sorty", "@com_github_johannesboyne_gofakes3//:gofakes3", "@com_github_johannesboyne_gofakes3//backend/s3mem", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_stretchr_testify//require", "@org_golang_x_exp//rand", "@org_golang_x_sync//errgroup", "@org_uber_go_atomic//:atomic", "@org_uber_go_zap//:zap", ], )