[−][src]Function streaming_platform::client::stream_mode
pub async fn stream_mode<T: 'static, R: 'static, '_, '_, '_>(
host: &'_ str,
addr: &'_ str,
access_key: &'_ str,
process_stream: ProcessStream<T>,
startup: Startup<R>,
config: HashMap<String, String>,
restream_rx: Option<UnboundedReceiver<RestreamMsg>>
) where
T: Future<Output = ()> + Send,
R: Future<Output = ()> + Send,
Future for stream based client based on provided config. "addr" value will be used as address for endpoint, "host" value - network addr for the server (in host:port format) "access_key" value will be send for optional authorization, more information about this feature will be provided later. process_event is used for processing incoming message, which are marked as events via message kind. process_rpc is used for processing incoming message, which are marked as rpc request via message kind. startup is executed on the start of this function. restream_rx can be used for restreaming data somewhere else, for example returning data for incoming web request The protocol message format is in sp-dto crate.