aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/channelz.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/channel/channelz.h')
-rw-r--r--src/core/lib/channel/channelz.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/core/lib/channel/channelz.h b/src/core/lib/channel/channelz.h
index 3f728cda6d..d8113585c2 100644
--- a/src/core/lib/channel/channelz.h
+++ b/src/core/lib/channel/channelz.h
@@ -24,6 +24,7 @@
#include <grpc/grpc.h>
#include "src/core/lib/channel/channel_trace.h"
+#include "src/core/lib/gprpp/inlined_vector.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -50,8 +51,14 @@
#define GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT 0
namespace grpc_core {
+
namespace channelz {
+// TODO(ncteisen), this only contains the uuids of the children for now,
+// since that is all that is strictly needed. In a future enhancement we will
+// add human readable names as in the channelz.proto
+typedef InlinedVector<intptr_t, 10> ChildRefsList;
+
namespace testing {
class CallCountingHelperPeer;
class ChannelNodePeer;
@@ -193,11 +200,13 @@ class ChannelNode : public BaseNode {
// Handles channelz bookkeeping for servers
class ServerNode : public BaseNode {
public:
- explicit ServerNode(size_t channel_tracer_max_nodes);
+ ServerNode(grpc_server* server, size_t channel_tracer_max_nodes);
~ServerNode() override;
grpc_json* RenderJson() override;
+ char* RenderServerSockets(intptr_t start_socket_id);
+
// proxy methods to composed classes.
void AddTraceEvent(ChannelTrace::Severity severity, grpc_slice data) {
trace_.AddTraceEvent(severity, data);
@@ -213,6 +222,7 @@ class ServerNode : public BaseNode {
void RecordCallSucceeded() { call_counter_.RecordCallSucceeded(); }
private:
+ grpc_server* server_;
CallCountingHelper call_counter_;
ChannelTrace trace_;
};
@@ -253,6 +263,15 @@ class SocketNode : public BaseNode {
UniquePtr<char> peer_string_;
};
+// Handles channelz bookkeeping for listen sockets
+class ListenSocketNode : public BaseNode {
+ public:
+ ListenSocketNode();
+ ~ListenSocketNode() override {}
+
+ grpc_json* RenderJson() override;
+};
+
// Creation functions
typedef RefCountedPtr<ChannelNode> (*ChannelNodeCreationFunc)(grpc_channel*,