aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/channelz.h
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-10-02 09:55:00 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-10-02 09:55:00 -0700
commit3545d754d53448ce4ce17ac9605d4765094aa739 (patch)
tree1e55733262852b2683a91f8f7a471822ea796904 /src/core/lib/channel/channelz.h
parentfd2fe1d5c42e95dc7c9a0dc59c6233d70ae85ff4 (diff)
Channelz get server sockets support
Diffstat (limited to 'src/core/lib/channel/channelz.h')
-rw-r--r--src/core/lib/channel/channelz.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lib/channel/channelz.h b/src/core/lib/channel/channelz.h
index 5edd90c813..9ae2e56ec8 100644
--- a/src/core/lib/channel/channelz.h
+++ b/src/core/lib/channel/channelz.h
@@ -74,6 +74,12 @@ class BaseNode : public RefCounted<BaseNode> {
// All children must implement this function.
virtual grpc_json* RenderJson() GRPC_ABSTRACT;
+ // Fat interface for functionality that will only ever be called on Servers.
+ // All other channelz entities will assert false.
+ virtual char* RenderServerSockets(intptr_t start_socket_id) {
+ GPR_ASSERT(false);
+ }
+
// Renders the json and returns allocated string that must be freed by the
// caller.
char* RenderJsonString();
@@ -184,6 +190,10 @@ class ServerNode : public BaseNode {
grpc_json* RenderJson() override;
+ // Server overrides this functionality to populate the JSON with
+ // the sockets it owns.
+ char* RenderServerSockets(intptr_t start_socket_id) override;
+
// proxy methods to composed classes.
void AddTraceEvent(ChannelTrace::Severity severity, grpc_slice data) {
trace_.AddTraceEvent(severity, data);