pub fn new<C>(connector: C, endpoint: Endpoint) -> Self
    where
        C: Service<Uri> + Send + 'static,
        C::Error: Into<crate::BoxError> + Send,
        C::Future: Send,
        C::Response: rt::Read + rt::Write + Unpin + Send + 'static,
    {
        let buffer_size = endpoint.buffer_size.unwrap_or(DEFAULT_BUFFER_SIZE);
        let executor = endpoint.executor.clone();

        let svc = Connection::lazy(connector, endpoint);
        let (svc, worker) = Buffer::pair(svc, buffer_size);

        executor.execute(worker);

        Channel { svc }
    }
Create a new [`Channel`] using a custom connector to the provided [Endpoint].

This is a lower level API, prefer to use [`Endpoint::connect_lazy`] if you are not using a custom connector.
tonic/src/transport/channel/mod.rs