blob: c4eb2264d54b3cd5c6f3ab681d21f64053652569 [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "bmdb",
srcs = [
"bmdb.go",
"connection.go",
"sessions.go",
],
importpath = "source.monogon.dev/cloud/bmaas/bmdb",
visibility = ["//visibility:public"],
deps = [
"//cloud/bmaas/bmdb/metrics",
"//cloud/bmaas/bmdb/model",
"//cloud/bmaas/bmdb/reflection",
"//cloud/lib/component",
"@com_github_cockroachdb_cockroach_go_v2//crdb",
"@com_github_google_uuid//:uuid",
"@com_github_lib_pq//:pq",
"@com_github_prometheus_client_golang//prometheus",
"@io_k8s_klog_v2//:klog",
],
)
go_test(
name = "bmdb_test",
srcs = [
"backoff_test.go",
"migrations_test.go",
"queries_test.go",
"reflection_test.go",
"sessions_test.go",
],
data = [
"@cockroach",
],
embed = [":bmdb"],
deps = [
"//cloud/agent/api",
"//cloud/bmaas/bmdb/model",
"//cloud/bmaas/bmdb/reflection",
"//cloud/bmaas/server/api",
"//cloud/lib/component",
"@com_github_google_go_cmp//cmp",
"@com_github_google_uuid//:uuid",
"@org_golang_google_protobuf//proto",
],
)