grpc_client

Crates.iogrpc_client
lib.rsgrpc_client
version0.1.6
created_at2025-07-07 10:22:15.706191+00
updated_at2025-07-07 11:06:51.961276+00
descriptiongrpc_client
homepagehttps://github.com/i18n-site/rust/tree/dev/grpc_client
repositoryhttps://github.com/i18n-site/rust.git
max_upload_size
id1740981
size33,604
i18n.site (i18nsite)

documentation

README

grpc_client

use bytes::Bytes;
use tonic::transport::Endpoint;

pub fn endpoint(addr: impl Into<Bytes>) -> Result<Endpoint, tonic::transport::Error> {
  use tonic::transport::Endpoint;
  Ok(
    Endpoint::from_shared(addr)?
      .http2_keep_alive_interval(std::time::Duration::from_secs(60))
      .keep_alive_while_idle(true),
  )
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Commit count: 68

cargo fmt