prysm-pulse/validator/web/BUILD.bazel
ahadda5 8dd2915d3c
Unify gRPC Gateways into Single, Shared lib (#8799)
* moved validator/rpc/gateway under shared,  validator/rpc/web is not visiable to the new shared gateway

* decided to have one lib with two methods if needed, status and stop are the same, however New and Start are not

* moved beacon's gateway to shared and moved the main func to its own /server folder

* goftm

* gofmt

* removed the extra loggin

* reduce visibility

* tighter visibilty of the shared lib for beacon and validator only for now

* fix patterns , ctx needs to be first param

* fix comments

* gofmt

* added enum for the caller id

* added unit test for gateway

* deprecated .WithDialer to .WithContextDialer

* changed the string callerId to uint8, and rearranged the Gateway struct based on the compiler

* fix 1 based on comment

* iota type

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-05-04 17:20:58 +02:00

39 lines
918 B
Python

load("@io_bazel_rules_go//go:def.bzl", "go_test")
load("@prysm//tools/go:def.bzl", "go_library")
load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data")
# gazelle:ignore site_data.go
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"handler.go",
"log.go",
":site_data", # keep
],
importpath = "github.com/prysmaticlabs/prysm/validator/web",
visibility = [
"//shared/gateway:__pkg__",
"//validator:__subpackages__",
],
deps = [
"//shared:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
],
)
go_embed_data(
name = "site_data",
srcs = [
"@prysm_web_ui//:site",
],
var = "site",
)
go_test(
name = "go_default_test",
srcs = ["handler_test.go"],
embed = [":go_default_library"],
deps = ["//shared/testutil/assert:go_default_library"],
)