load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "lightning", srcs = [ "lightning.go", "run_options.go", "sigusr1_other.go", "sigusr1_unix.go", ], importpath = "github.com/pingcap/tidb/br/pkg/lightning", visibility = ["//visibility:public"], deps = [ "//br/pkg/lightning/backend/local", "//br/pkg/lightning/checkpoints", "//br/pkg/lightning/common", "//br/pkg/lightning/config", "//br/pkg/lightning/glue", "//br/pkg/lightning/log", "//br/pkg/lightning/metric", "//br/pkg/lightning/mydump", "//br/pkg/lightning/restore", "//br/pkg/lightning/tikv", "//br/pkg/lightning/web", "//br/pkg/redact", "//br/pkg/storage", "//br/pkg/utils", "//br/pkg/version/build", "//expression", "//planner/core", "//util/promutil", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_pingcap_kvproto//pkg/import_sstpb", "@com_github_prometheus_client_golang//prometheus", "@com_github_prometheus_client_golang//prometheus/collectors", "@com_github_prometheus_client_golang//prometheus/promhttp", "@com_github_shurcool_httpgzip//:httpgzip", "@org_golang_x_exp//slices", "@org_uber_go_atomic//:atomic", "@org_uber_go_zap//:zap", "@org_uber_go_zap//zapcore", ], ) go_test( name = "lightning_test", timeout = "short", srcs = [ "lightning_serial_test.go", "lightning_server_serial_test.go", "main_test.go", ], embed = [":lightning"], flaky = True, deps = [ "//br/pkg/lightning/checkpoints", "//br/pkg/lightning/config", "//br/pkg/lightning/glue", "//br/pkg/lightning/log", "//br/pkg/lightning/mydump", "//br/pkg/lightning/web", "@com_github_docker_go_units//:go-units", "@com_github_pingcap_failpoint//:failpoint", "@com_github_stretchr_testify//require", ], )