| 96 | } |
| 97 | |
| 98 | int Init() { |
| 99 | channel_ = new brpc::Channel(); |
| 100 | brpc::ChannelOptions options; |
| 101 | if (use_sleep_policy_) { |
| 102 | options.retry_policy = &sleep_retry_policy; |
| 103 | } |
| 104 | if (channel_->Init(endpoint_.c_str(), "", &options) != 0) { |
| 105 | return -1; |
| 106 | } |
| 107 | stub_ = new T(channel_); |
| 108 | return 0; |
| 109 | } |
| 110 | |
| 111 | template <class Request, class Response, class Callback> |
| 112 | bool SendRequest(void (T::*func)(google::protobuf::RpcController*, |
nothing calls this directly
no outgoing calls
no test coverage detected