[][src]Function streaming_platform::client::start_stream

pub fn start_stream<T: 'static, R: 'static>(
    config: HashMap<String, String>,
    process_stream: ProcessStream<T>,
    startup: Startup<R>,
    restream_rx: Option<UnboundedReceiver<RestreamMsg>>
) where
    T: Future<Output = ()> + Send,
    R: Future<Output = ()> + Send

Starts a stream based client based on provided config. Creates new runtime and blocks. Config must have "addr" key, this will be used as address for endpoint, and "host" key - network addr for the server (in host:port format) Config must have "access_key" key, this will be send for optional authorization, more information about this feature will be provided later. process_stream is used for stream of incoming data processing. 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.