2021-03-04 21:01:32 +00:00
|
|
|
load("@prysm//tools/go:def.bzl", "go_library")
|
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_test")
|
2018-10-05 17:14:50 +00:00
|
|
|
|
2019-12-18 02:07:49 +00:00
|
|
|
# Build with --define=kafka_enabled=false to exclude kafka wrapper.
|
|
|
|
config_setting(
|
|
|
|
name = "kafka_disabled",
|
|
|
|
values = {"define": "kafka_enabled=false"},
|
|
|
|
)
|
|
|
|
|
2021-03-08 18:09:39 +00:00
|
|
|
# gazelle:exclude db.go
|
|
|
|
# gazelle:exclude db_kafka_wrapped.go
|
2018-10-05 17:14:50 +00:00
|
|
|
go_library(
|
|
|
|
name = "go_default_library",
|
2019-10-03 09:29:49 +00:00
|
|
|
srcs = [
|
2019-12-18 02:07:49 +00:00
|
|
|
"alias.go",
|
2021-01-11 20:03:28 +00:00
|
|
|
"log.go",
|
2020-12-07 20:36:43 +00:00
|
|
|
"restore.go",
|
2019-12-18 02:07:49 +00:00
|
|
|
] + select({
|
|
|
|
":kafka_disabled": [
|
|
|
|
"db.go",
|
|
|
|
],
|
2020-04-28 01:13:33 +00:00
|
|
|
"//conditions:default": [
|
|
|
|
"db_kafka_wrapped.go",
|
|
|
|
],
|
2019-12-18 02:07:49 +00:00
|
|
|
}),
|
2018-10-05 17:14:50 +00:00
|
|
|
importpath = "github.com/prysmaticlabs/prysm/beacon-chain/db",
|
2019-10-23 05:43:41 +00:00
|
|
|
visibility = [
|
|
|
|
"//beacon-chain:__subpackages__",
|
2021-03-02 19:36:03 +00:00
|
|
|
"//cmd/beacon-chain:__subpackages__",
|
2020-09-14 18:42:08 +00:00
|
|
|
"//fuzz:__pkg__",
|
2019-10-23 05:43:41 +00:00
|
|
|
"//tools:__subpackages__",
|
|
|
|
],
|
2018-10-05 17:14:50 +00:00
|
|
|
deps = [
|
2020-03-30 22:10:45 +00:00
|
|
|
"//beacon-chain/cache:go_default_library",
|
2019-12-06 02:05:58 +00:00
|
|
|
"//beacon-chain/db/iface:go_default_library",
|
2019-08-14 18:48:28 +00:00
|
|
|
"//beacon-chain/db/kv:go_default_library",
|
2021-04-23 17:06:13 +00:00
|
|
|
"//beacon-chain/db/slasherkv:go_default_library",
|
2020-12-07 20:36:43 +00:00
|
|
|
"//shared/cmd:go_default_library",
|
|
|
|
"//shared/fileutil:go_default_library",
|
|
|
|
"//shared/promptutil:go_default_library",
|
|
|
|
"//shared/tos:go_default_library",
|
|
|
|
"@com_github_pkg_errors//:go_default_library",
|
2019-10-03 09:29:49 +00:00
|
|
|
"@com_github_sirupsen_logrus//:go_default_library",
|
2020-12-07 20:36:43 +00:00
|
|
|
"@com_github_urfave_cli_v2//:go_default_library",
|
2019-12-18 02:07:49 +00:00
|
|
|
] + select({
|
|
|
|
"//conditions:default": [
|
|
|
|
"//beacon-chain/db/kafka:go_default_library",
|
|
|
|
],
|
|
|
|
":kafka_disabled": [],
|
|
|
|
}),
|
2018-10-05 17:14:50 +00:00
|
|
|
)
|
2019-09-18 17:05:24 +00:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "go_default_test",
|
2021-03-04 21:01:32 +00:00
|
|
|
srcs = [
|
|
|
|
"db_test.go",
|
|
|
|
"restore_test.go",
|
|
|
|
],
|
2019-09-18 17:05:24 +00:00
|
|
|
embed = [":go_default_library"],
|
2021-03-04 21:01:32 +00:00
|
|
|
deps = [
|
|
|
|
"//beacon-chain/db/kv:go_default_library",
|
|
|
|
"//shared/cmd:go_default_library",
|
|
|
|
"//shared/testutil:go_default_library",
|
|
|
|
"//shared/testutil/assert:go_default_library",
|
|
|
|
"//shared/testutil/require:go_default_library",
|
|
|
|
"@com_github_prysmaticlabs_eth2_types//:go_default_library",
|
|
|
|
"@com_github_sirupsen_logrus//hooks/test:go_default_library",
|
|
|
|
"@com_github_urfave_cli_v2//:go_default_library",
|
|
|
|
],
|
2019-09-18 17:05:24 +00:00
|
|
|
)
|