| 870 | } |
| 871 | |
| 872 | Status DebugGrpcIO::SendEventProtoThroughGrpcStream( |
| 873 | const Event& event_proto, const string& grpc_stream_url, |
| 874 | const bool receive_reply) { |
| 875 | DebugGrpcChannel* debug_grpc_channel; |
| 876 | TF_RETURN_IF_ERROR( |
| 877 | GetOrCreateDebugGrpcChannel(grpc_stream_url, &debug_grpc_channel)); |
| 878 | |
| 879 | bool write_ok = debug_grpc_channel->WriteEvent(event_proto); |
| 880 | if (!write_ok) { |
| 881 | return errors::Cancelled(strings::StrCat("Write event to stream URL ", |
| 882 | grpc_stream_url, " failed.")); |
| 883 | } |
| 884 | |
| 885 | if (receive_reply) { |
| 886 | debug_grpc_channel->ReceiveAndProcessEventReplies(1); |
| 887 | } |
| 888 | |
| 889 | return Status::OK(); |
| 890 | } |
| 891 | |
| 892 | bool DebugGrpcIO::IsReadGateOpen(const string& grpc_debug_url, |
| 893 | const string& watch_key) { |
nothing calls this directly
no test coverage detected