Skip to content

Commit daf1fe8

Browse files
ctillerpaulosjca
authored andcommitted
[channelz-v2] Place down the basic protobufs (grpc#39871)
Per grpc/proposal#493 (sans service just yet) - just getting the basic protobufs in place to start working on implementation Closes grpc#39871 PiperOrigin-RevId: 772476936
1 parent 7ee1372 commit daf1fe8

File tree

9 files changed

+812
-0
lines changed

9 files changed

+812
-0
lines changed

BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5168,6 +5168,16 @@ grpc_upb_proto_reflection_library(
51685168
deps = ["//src/proto/grpc/lookup/v1:rls_config_proto"],
51695169
)
51705170

5171+
grpc_upb_proto_library(
5172+
name = "channelz_upb",
5173+
deps = ["//src/proto/grpc/channelz/v2:channelz_proto"],
5174+
)
5175+
5176+
grpc_upb_proto_reflection_library(
5177+
name = "channelz_upbdefs",
5178+
deps = ["//src/proto/grpc/channelz/v2:channelz_proto"],
5179+
)
5180+
51715181
WELL_KNOWN_PROTO_TARGETS = [
51725182
"any",
51735183
"duration",

bazel/grpc_build_system.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,8 @@ def grpc_package(name, visibility = "private", features = []):
745745
visibility = ["//visibility:public"]
746746
elif visibility == "private":
747747
visibility = []
748+
elif visibility == "grpc":
749+
visibility = ["//:__subpackages__"]
748750
else:
749751
fail("Unknown visibility " + visibility)
750752

src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb.h

Lines changed: 470 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.h

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/channelz.upbdefs.c

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/channelz.upbdefs.h

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/proto/grpc/channelz/v2/BUILD

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2025 gRPC 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+
15+
load("//bazel:grpc_build_system.bzl", "grpc_internal_proto_library", "grpc_package")
16+
17+
licenses(["notice"])
18+
19+
grpc_package(
20+
name = "src/proto/grpc/channelz/v2",
21+
visibility = "grpc",
22+
)
23+
24+
grpc_internal_proto_library(
25+
name = "channelz_proto",
26+
srcs = ["channelz.proto"],
27+
deps = [
28+
"@com_google_protobuf//:any_proto",
29+
"@com_google_protobuf//:timestamp_proto",
30+
],
31+
)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright 2025 The gRPC 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+
15+
syntax = "proto3";
16+
17+
///////////////////////////////////////////////////////////////////////////////
18+
// 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨
19+
//
20+
// This protocol is under active development, and will change in backwards
21+
// incompatible ways in the future.
22+
//
23+
// DO NOT take a dependency on this without contacting the gRPC authors
24+
// (who will advise against taking such a dependency in as strong a fashion
25+
// as they are able)
26+
//
27+
// 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨 🚨
28+
///////////////////////////////////////////////////////////////////////////////
29+
30+
package grpc.channelz.v2;
31+
32+
import "google/protobuf/any.proto";
33+
import "google/protobuf/timestamp.proto";
34+
35+
message Entity {
36+
// The identifier for this entity.
37+
int64 id = 1;
38+
// The kind of this entity.
39+
string kind = 2;
40+
// Parents for this entity.
41+
repeated int64 parents = 3;
42+
// Has this entity been orphaned?
43+
bool orphaned = 4;
44+
// Instantaneous data for this entity.
45+
repeated google.protobuf.Any data = 5;
46+
// Historical trace information for the entity.
47+
repeated TraceEvent trace = 6;
48+
}
49+
50+
message TraceEvent {
51+
// High level description of the event.
52+
string description = 1;
53+
// When this event occurred.
54+
google.protobuf.Timestamp timestamp = 2;
55+
// Any additional supporting data.
56+
repeated google.protobuf.Any data = 3;
57+
}

0 commit comments

Comments
 (0)