| 79 | } |
| 80 | |
| 81 | Status VerbsServer::Init(ServiceInitFunction service_func, |
| 82 | RendezvousMgrCreationFunction rendezvous_mgr_func) { |
| 83 | std::call_once(reg_mem_visitors_call, []() { RdmaMgr::RegMemVisitors(); }); |
| 84 | GrpcServerOptions opts; |
| 85 | opts.service_func = service_func; |
| 86 | opts.rendezvous_mgr_func = rendezvous_mgr_func; |
| 87 | Status s = GrpcServer::Init(opts); |
| 88 | { |
| 89 | mutex_lock l(mu_); |
| 90 | CHECK_EQ(verbs_state_, DISCONNECTED); |
| 91 | CHECK(ChannelCacheFactory(server_def(), &channel_cache_).ok()); |
| 92 | rdma_mgr_ = new RdmaMgr(worker_env(), channel_cache_); |
| 93 | // set rdma_mgr for verbs_service and rdma_rendezvous_mgr |
| 94 | verbs_service_->SetRdmaMgr(rdma_mgr_); |
| 95 | dynamic_cast<RdmaRendezvousMgr*>(worker_env()->rendezvous_mgr) |
| 96 | ->SetRdmaMgr(rdma_mgr_); |
| 97 | } |
| 98 | return s; |
| 99 | } |
| 100 | |
| 101 | Status VerbsServer::Start() { |
| 102 | Status s = GrpcServer::Start(); |
no test coverage detected