Function tvix_castore::tonic::channel_from_url

source ยท
pub async fn channel_from_url(url: &Url) -> Result<Channel, Error>
Expand description

Turn a url::Url to a Channel if it can be parsed successfully. It supports the following schemes (and URLs):

  • grpc+http://[::1]:8000, connecting over unencrypted HTTP/2 (h2c)
  • grpc+https://[::1]:8000, connecting over encrypted HTTP/2
  • grpc+unix:/path/to/socket, connecting to a unix domain socket

All URLs support adding wait-connect=1 as a URL parameter, in which case the connection is established lazily.