1# Copyright 2018, OpenCensus Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load("@rules_proto//proto:defs.bzl", "proto_library")
16
17package(default_visibility = ["//visibility:public"])
18
19load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
20load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
21
22proto_library(
23    name = "metrics_service_proto",
24    srcs = ["metrics_service.proto"],
25    deps = [
26        "//opencensus/proto/agent/common/v1:common_proto",
27        "//opencensus/proto/metrics/v1:metrics_proto",
28        "//opencensus/proto/resource/v1:resource_proto",
29    ],
30)
31
32cc_proto_library(
33    name = "metrics_service_proto_cc",
34    deps = [":metrics_service_proto"],
35)
36
37cc_grpc_library(
38    name = "metrics_service_grpc_cc",
39    srcs = [":metrics_service_proto"],
40    grpc_only = True,
41    deps = [":metrics_service_proto_cc"],
42)
43
44go_proto_library(
45    name = "metrics_service_proto_go",
46    importpath = "github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1",
47    proto = ":metrics_service_proto",
48    deps = [
49        "//opencensus/proto/agent/common/v1:common_proto_go",
50        "//opencensus/proto/metrics/v1:metrics_proto_go",
51        "//opencensus/proto/resource/v1:resource_proto_go",
52    ],
53)
54