load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "metautil", srcs = [ "load.go", "metafile.go", "statsfile.go", ], importpath = "github.com/pingcap/tidb/br/pkg/metautil", visibility = ["//visibility:public"], deps = [ "//br/pkg/errors", "//br/pkg/logutil", "//br/pkg/storage", "//br/pkg/summary", "//br/pkg/utils", "//pkg/meta/model", "//pkg/statistics/handle", "//pkg/statistics/handle/types", "//pkg/statistics/handle/util", "//pkg/tablecodec", "//pkg/util", "//pkg/util/encrypt", "@com_github_docker_go_units//:go-units", "@com_github_gogo_protobuf//proto", "@com_github_opentracing_opentracing_go//:opentracing-go", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_pingcap_kvproto//pkg/encryptionpb", "@com_github_pingcap_log//:log", "@org_golang_x_sync//errgroup", "@org_uber_go_zap//:zap", ], ) go_test( name = "metautil_test", timeout = "short", srcs = [ "load_test.go", "main_test.go", "metafile_test.go", "statsfile_test.go", ], embed = [":metautil"], flaky = True, shard_count = 9, deps = [ "//br/pkg/storage", "//br/pkg/utils", "//pkg/meta/model", "//pkg/parser/model", "//pkg/statistics/handle/types", "//pkg/statistics/handle/util", "//pkg/tablecodec", "//pkg/testkit/testsetup", "//pkg/util", "@com_github_golang_protobuf//proto", "@com_github_pingcap_kvproto//pkg/brpb", "@com_github_pingcap_kvproto//pkg/encryptionpb", "@com_github_pingcap_tipb//go-tipb", "@com_github_stretchr_testify//require", "@org_golang_x_sync//errgroup", "@org_uber_go_goleak//:goleak", ], )