grpc_client 0.1.6

grpc_client
Documentation

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 ⋅ 国际化解决方案 的开源组件。