blob: 2c909c6b74d6ca5031ee7e1aade08ff1ed031ae6 [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "rpc",
srcs = [
"rpc.go",
"rpc.pb.go",
"rpc.twirp.go",
],
importpath = "go.skia.org/infra/task_scheduler/go/rpc",
visibility = ["//visibility:public"],
deps = [
"//go/alogin",
"//go/git/repograph",
"//go/now",
"//go/sklog",
"//go/swarming/v2:swarming",
"//go/twirp_auth2",
"//task_scheduler/go/db",
"//task_scheduler/go/skip_tasks",
"//task_scheduler/go/task_cfg_cache",
"//task_scheduler/go/types",
"@com_github_golang_protobuf//jsonpb:go_default_library_gen",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_twitchtv_twirp//:twirp",
"@com_github_twitchtv_twirp//ctxsetters",
"@org_chromium_go_luci//swarming/proto/api_v2",
"@org_golang_google_protobuf//reflect/protoreflect",
"@org_golang_google_protobuf//runtime/protoimpl",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)
go_test(
name = "rpc_test",
srcs = ["rpc_test.go"],
embed = [":rpc"],
deps = [
"//go/alogin",
"//go/deepequal/assertdeep",
"//go/firestore/testutils",
"//go/git",
"//go/git/repograph",
"//go/git/testutils/mem_git",
"//go/gitstore",
"//go/gitstore/mem_gitstore",
"//go/roles",
"//go/swarming/v2/mocks",
"//go/testutils",
"//task_scheduler/go/db/memory",
"//task_scheduler/go/skip_tasks",
"//task_scheduler/go/specs",
"//task_scheduler/go/task_cfg_cache",
"//task_scheduler/go/task_cfg_cache/testutils",
"//task_scheduler/go/types",
"@com_github_stretchr_testify//require",
"@org_chromium_go_luci//swarming/proto/api_v2",
"@org_golang_google_protobuf//types/known/timestamppb",
],
)