Static method.
| 403 | |
| 404 | // Static method. |
| 405 | Status GrpcSession::Reset(const SessionOptions& options, |
| 406 | const std::vector<string>& containers) { |
| 407 | SharedGrpcChannelPtr master_channel; |
| 408 | TF_RETURN_IF_ERROR( |
| 409 | NewHostPortGrpcChannel(options.target.substr(kSchemePrefixLength), |
| 410 | /*rpc_options=*/nullptr, &master_channel)); |
| 411 | auto master = NewGrpcMaster(master_channel); |
| 412 | ResetRequest req; |
| 413 | for (const auto& c : containers) req.add_container(c); |
| 414 | ResetResponse resp; |
| 415 | CallOptions call_options; |
| 416 | call_options.SetTimeout(options.config.operation_timeout_in_ms()); |
| 417 | Status ret = master->Reset(&call_options, &req, &resp); |
| 418 | delete master; |
| 419 | return ret; |
| 420 | } |
| 421 | |
| 422 | Status GrpcSession::MakeCallable(const CallableOptions& callable_options, |
| 423 | CallableHandle* out_handle) { |
no test coverage detected