channel_test_peer.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2020 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 GRPCPP_TEST_CHANNEL_TEST_PEER_H
20 #define GRPCPP_TEST_CHANNEL_TEST_PEER_H
21 
22 #include <grpcpp/channel.h>
23 
24 namespace grpc {
25 namespace testing {
26 
29  public:
31 
33  grpc_channel* channel() const { return channel_->c_channel_; }
34  int registered_calls() const;
35  int registration_attempts() const;
36 
37  private:
38  Channel* channel_; // not owned
39 };
40 
41 } // namespace testing
42 } // namespace grpc
43 
44 #endif // GRPCPP_TEST_CHANNEL_TEST_PEER_H
testing
Definition: aws_request_signer_test.cc:25
grpc
Definition: grpcpp/alarm.h:33
grpc::testing::ChannelTestPeer::channel_
Channel * channel_
Definition: channel_test_peer.h:38
grpc::Channel
Channels represent a connection to an endpoint. Created by CreateChannel.
Definition: include/grpcpp/channel.h:54
grpc::testing::ChannelTestPeer::ChannelTestPeer
ChannelTestPeer(Channel *channel)
Definition: channel_test_peer.h:30
channel.h
grpc::testing::ChannelTestPeer::registered_calls
int registered_calls() const
Definition: channel_test_peer.cc:27
grpc::Channel::c_channel_
grpc_channel *const c_channel_
Definition: include/grpcpp/channel.h:108
grpc::testing::ChannelTestPeer::channel
grpc_channel * channel() const
Provide the gRPC Core channel.
Definition: channel_test_peer.h:33
grpc::testing::ChannelTestPeer
A test-only class to access private members of Channel.
Definition: channel_test_peer.h:28
grpc::testing::ChannelTestPeer::registration_attempts
int registration_attempts() const
Definition: channel_test_peer.cc:32
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:44