pub fn balance_channel_with_executor<K, E>(
        capacity: usize,
        executor: E,
    ) -> (Self, Sender<Change<K, Endpoint>>)
    where
        K: Hash + Eq + Send + Clone + 'static,
        E: Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync + 'static,
    {
        let (tx, rx) = channel(capacity);
        let list = DynamicServiceStream::new(rx);
        (Self::balance(list, DEFAULT_BUFFER_SIZE, executor), tx)
    }
Balance a list of [`Endpoint`]'s.

This creates a [`Channel`] that will listen to a stream of change events and will add or remove provided endpoints.

The [`Channel`] will use the given executor to spawn async tasks.
tonic/src/transport/channel/mod.rs