Skip to content

Commit 84871e1

Browse files
committed
feedback from @abey79
1 parent 5caccb2 commit 84871e1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

crates/store/re_grpc_client/src/message_proxy/write_table.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use re_protos::sdk_comms::v1alpha1::message_proxy_service_client::MessageProxyServiceClient;
22

33
#[cfg(not(target_arch = "wasm32"))]
4-
pub type TableClient = MessageProxyServiceClient<tonic::transport::Channel>;
4+
pub type ViewerClient = MessageProxyServiceClient<tonic::transport::Channel>;
55

66
#[cfg(not(target_arch = "wasm32"))]
7-
pub async fn table_client(
7+
pub async fn viewer_client(
88
origin: re_uri::Origin,
9-
) -> Result<MessageProxyServiceClient<tonic::transport::Channel>, crate::redap::ConnectionError> {
9+
) -> Result<ViewerClient, crate::redap::ConnectionError> {
1010
let channel = crate::redap::channel(origin).await?;
1111
Ok(MessageProxyServiceClient::new(channel)
1212
.max_decoding_message_size(crate::MAX_DECODING_MESSAGE_SIZE))

rerun_py/src/viewer.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use arrow::array::RecordBatch;
44
use pyo3::{prelude::*, Bound, PyResult};
55

6-
use re_grpc_client::message_proxy::write_table::table_client;
6+
use re_grpc_client::message_proxy::write_table::viewer_client;
77
use re_log_encoding::codec::wire::encoder::Encode as _;
88
use re_protos::sdk_comms::v1alpha1::message_proxy_service_client::MessageProxyServiceClient;
99

@@ -19,7 +19,7 @@ pub(crate) fn register(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()>
1919
/// A connection to an instance of a Rerun viewer.
2020
#[pyclass(name = "ViewerClient")]
2121
pub struct PyViewerClient {
22-
conn: TableConnectionHandle,
22+
conn: ViewerConnectionHandle,
2323
}
2424
#[pymethods]
2525
impl PyViewerClient {
@@ -29,7 +29,7 @@ impl PyViewerClient {
2929
fn new(py: Python<'_>, addr: String) -> PyResult<Self> {
3030
let origin = addr.as_str().parse::<re_uri::Origin>().map_err(to_py_err)?;
3131

32-
let conn = TableConnectionHandle::new(py, origin.clone())?;
32+
let conn = ViewerConnectionHandle::new(py, origin.clone())?;
3333

3434
Ok(Self { conn })
3535
}
@@ -55,19 +55,19 @@ impl PyViewerClient {
5555
/// table-related operations, most importantly `WriteTable`.
5656
// TODO(grtlr): In the future, we probably want to merge this with the other APIs.
5757
#[derive(Clone)]
58-
pub struct TableConnectionHandle {
58+
pub struct ViewerConnectionHandle {
5959
client: MessageProxyServiceClient<tonic::transport::Channel>,
6060
}
6161

62-
impl TableConnectionHandle {
62+
impl ViewerConnectionHandle {
6363
pub fn new(py: Python<'_>, origin: re_uri::Origin) -> PyResult<Self> {
64-
let client = wait_for_future(py, table_client(origin.clone())).map_err(to_py_err)?;
64+
let client = wait_for_future(py, viewer_client(origin.clone())).map_err(to_py_err)?;
6565

6666
Ok(Self { client })
6767
}
6868
}
6969

70-
impl TableConnectionHandle {
70+
impl ViewerConnectionHandle {
7171
fn send_table(
7272
&mut self,
7373
py: Python<'_>,

0 commit comments

Comments
 (0)