static */
| 447 | |
| 448 | /* static */ |
| 449 | Status GrpcServer::Create(const ServerDef& server_def, Env* env, |
| 450 | std::unique_ptr<ServerInterface>* out_server) { |
| 451 | std::unique_ptr<GrpcServer> ret( |
| 452 | new GrpcServer(server_def, env == nullptr ? Env::Default() : env)); |
| 453 | ServiceInitFunction service_func = nullptr; |
| 454 | GrpcServerOptions options; |
| 455 | options.rendezvous_mgr_func = NewRpcRendezvousMgr; |
| 456 | Status s = ret->Init(options); |
| 457 | if (!s.ok()) { |
| 458 | LOG(ERROR) << s; |
| 459 | return s; |
| 460 | } |
| 461 | *out_server = std::move(ret); |
| 462 | return Status::OK(); |
| 463 | } |
| 464 | |
| 465 | /* static */ |
| 466 | Status GrpcServer::Create(const ServerDef& server_def, Env* env, |
no test coverage detected