load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "bdp_estimator.go",
        "controlbuf.go",
        "flowcontrol.go",
        "go16.go",
        "go17.go",
        "handler_server.go",
        "http2_client.go",
        "http2_server.go",
        "http_util.go",
        "log.go",
        "transport.go",
    ],
    importpath = "google.golang.org/grpc/transport",
    visibility = ["//visibility:public"],
    deps = [
        "//codes:go_default_library",
        "//credentials:go_default_library",
        "//grpclog:go_default_library",
        "//internal/channelz:go_default_library",
        "//internal/grpcrand:go_default_library",
        "//keepalive:go_default_library",
        "//metadata:go_default_library",
        "//peer:go_default_library",
        "//stats:go_default_library",
        "//status:go_default_library",
        "//tap:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@org_golang_google_genproto//googleapis/rpc/status:go_default_library",
        "@org_golang_x_net//context:go_default_library",
        "@org_golang_x_net//http2:go_default_library",
        "@org_golang_x_net//http2/hpack:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "handler_server_test.go",
        "http_util_test.go",
        "transport_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//codes:go_default_library",
        "//internal/leakcheck:go_default_library",
        "//keepalive:go_default_library",
        "//metadata:go_default_library",
        "//status:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
        "@org_golang_google_genproto//googleapis/rpc/errdetails:go_default_library",
        "@org_golang_x_net//context:go_default_library",
        "@org_golang_x_net//http2:go_default_library",
        "@org_golang_x_net//http2/hpack:go_default_library",
    ],
)
