dataSourceMiddleware
Consumes DataSourceCall and launches a DataSource call in a foreground coroutine.
It requires DataSourceResolver in a dispatch closure that provides DataSources. If DataSource with DataSourceCall.key cannot be resolved it throws an exception with no dispatched actions.
The foreground coroutine dispatches:
DataSourceAction with DataSourcePayload.Started before a foreground coroutine launch.
DataSourceAction with DataSourcePayload.Success after successful DataSource call.
DataSourceAction with DataSourcePayload.Failure after failure DataSource call.
DataSourceAction with DataSourcePayload.Failure with CancellationException after cancellation.