chromium/third_party/grpc/src/src/core/lib/channel/channelz.cc

//
//
// Copyright 2017 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

#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::BaseNode(EntityType type, std::string name)
    :{}

BaseNode::~BaseNode() {}

std::string BaseNode::RenderJsonString() {}

//
// CallCountingHelper
//

CallCountingHelper::CallCountingHelper() {}

void CallCountingHelper::RecordCallStarted() {}

void CallCountingHelper::RecordCallFailed() {}

void CallCountingHelper::RecordCallSucceeded() {}

void CallCountingHelper::CollectData(CounterData* out) {}

void CallCountingHelper::PopulateCallCounts(Json::Object* json) {}

//
// ChannelNode
//

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::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() {}

//
// SocketNode::Security::Tls
//

Json SocketNode::Security::Tls::RenderJson() {}

//
// SocketNode::Security
//

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 =;

}  // namespace

grpc_arg SocketNode::Security::MakeChannelArg() const {}

RefCountedPtr<SocketNode::Security> SocketNode::Security::GetFromChannelArgs(
    const grpc_channel_args* args) {}

//
// SocketNode
//

namespace {

void PopulateSocketAddressJson(Json::Object* json, const char* name,
                               const char* addr_str) {}

}  // namespace

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::ListenSocketNode(std::string local_addr, std::string name)
    :{}

Json ListenSocketNode::RenderJson() {}

}  // namespace channelz
}  // namespace grpc_core