#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz.h"
#include <algorithm>
#include <atomic>
#include "absl/status/statusor.h"
#include "absl/strings/escaping.h"
#include "absl/strings/strip.h"
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/lib/address_utils/parse_address.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/resolved_address.h"
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/uri/uri_parser.h"
namespace grpc_core {
namespace channelz {
BaseNode::BaseNode(EntityType type, std::string name)
: … { … }
BaseNode::~BaseNode() { … }
std::string BaseNode::RenderJsonString() { … }
CallCountingHelper::CallCountingHelper() { … }
void CallCountingHelper::RecordCallStarted() { … }
void CallCountingHelper::RecordCallFailed() { … }
void CallCountingHelper::RecordCallSucceeded() { … }
void CallCountingHelper::CollectData(CounterData* out) { … }
void CallCountingHelper::PopulateCallCounts(Json::Object* json) { … }
ChannelNode::ChannelNode(std::string target, size_t channel_tracer_max_nodes,
bool is_internal_channel)
: … { … }
const char* ChannelNode::GetChannelConnectivityStateChangeString(
grpc_connectivity_state state) { … }
Json ChannelNode::RenderJson() { … }
void ChannelNode::PopulateChildRefs(Json::Object* json) { … }
void ChannelNode::SetConnectivityState(grpc_connectivity_state state) { … }
void ChannelNode::AddChildChannel(intptr_t child_uuid) { … }
void ChannelNode::RemoveChildChannel(intptr_t child_uuid) { … }
void ChannelNode::AddChildSubchannel(intptr_t child_uuid) { … }
void ChannelNode::RemoveChildSubchannel(intptr_t child_uuid) { … }
ServerNode::ServerNode(size_t channel_tracer_max_nodes)
: … { … }
ServerNode::~ServerNode() { … }
void ServerNode::AddChildSocket(RefCountedPtr<SocketNode> node) { … }
void ServerNode::RemoveChildSocket(intptr_t child_uuid) { … }
void ServerNode::AddChildListenSocket(RefCountedPtr<ListenSocketNode> node) { … }
void ServerNode::RemoveChildListenSocket(intptr_t child_uuid) { … }
std::string ServerNode::RenderServerSockets(intptr_t start_socket_id,
intptr_t max_results) { … }
Json ServerNode::RenderJson() { … }
Json SocketNode::Security::Tls::RenderJson() { … }
Json SocketNode::Security::RenderJson() { … }
namespace {
void* SecurityArgCopy(void* p) { … }
void SecurityArgDestroy(void* p) { … }
int SecurityArgCmp(void* p, void* q) { … }
const grpc_arg_pointer_vtable kChannelArgVtable = …;
}
grpc_arg SocketNode::Security::MakeChannelArg() const { … }
RefCountedPtr<SocketNode::Security> SocketNode::Security::GetFromChannelArgs(
const grpc_channel_args* args) { … }
namespace {
void PopulateSocketAddressJson(Json::Object* json, const char* name,
const char* addr_str) { … }
}
SocketNode::SocketNode(std::string local, std::string remote, std::string name,
RefCountedPtr<Security> security)
: … { … }
void SocketNode::RecordStreamStartedFromLocal() { … }
void SocketNode::RecordStreamStartedFromRemote() { … }
void SocketNode::RecordMessagesSent(uint32_t num_sent) { … }
void SocketNode::RecordMessageReceived() { … }
Json SocketNode::RenderJson() { … }
ListenSocketNode::ListenSocketNode(std::string local_addr, std::string name)
: … { … }
Json ListenSocketNode::RenderJson() { … }
}
}