2019-09-18 17:05:24 +00:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library", "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"},
|
|
|
|
)
|
|
|
|
|
|
|
|
# gazelle:ignore db.go 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",
|
2019-10-03 09:29:49 +00:00
|
|
|
"http_backup_handler.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__",
|
|
|
|
"//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",
|
2019-10-03 09:29:49 +00:00
|
|
|
"@com_github_sirupsen_logrus//: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",
|
|
|
|
srcs = ["db_test.go"],
|
|
|
|
embed = [":go_default_library"],
|
|
|
|
deps = ["//beacon-chain/db/kv:go_default_library"],
|
|
|
|
)
|