1 /* 2 * 3 * Copyright 2018 gRPC authors. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 */ 18 19 #ifndef GRPC_INTERNAL_CPP_SERVER_CHANNELZ_SERVICE_H 20 #define GRPC_INTERNAL_CPP_SERVER_CHANNELZ_SERVICE_H 21 22 #include <grpc/support/port_platform.h> 23 24 #include <grpcpp/grpcpp.h> 25 #include "src/proto/grpc/channelz/channelz.grpc.pb.h" 26 27 namespace grpc { 28 29 class ChannelzService final : public channelz::v1::Channelz::Service { 30 private: 31 // implementation of GetTopChannels rpc 32 Status GetTopChannels( 33 ServerContext* unused, const channelz::v1::GetTopChannelsRequest* request, 34 channelz::v1::GetTopChannelsResponse* response) override; 35 // implementation of GetServers rpc 36 Status GetServers(ServerContext* unused, 37 const channelz::v1::GetServersRequest* request, 38 channelz::v1::GetServersResponse* response) override; 39 // implementation of GetChannel rpc 40 Status GetChannel(ServerContext* unused, 41 const channelz::v1::GetChannelRequest* request, 42 channelz::v1::GetChannelResponse* response) override; 43 // implementation of GetSubchannel rpc 44 Status GetSubchannel(ServerContext* unused, 45 const channelz::v1::GetSubchannelRequest* request, 46 channelz::v1::GetSubchannelResponse* response) override; 47 }; 48 49 } // namespace grpc 50 51 #endif // GRPC_INTERNAL_CPP_SERVER_CHANNELZ_SERVICE_H 52