public async Task HandleFetchClusterAction(FetchClusterAction action, IDispatcher dispatcher) { try { var cluster = await clusterService.GetClusterAsync(action.ClusterId); dispatcher.Dispatch(new FetchClusterSuccessAction(cluster)); } catch (Exception e) { dispatcher.Dispatch(new FetchClusterFailureAction(e.Message)); } }
public static ClusterState ReduceFetchClusterAction(ClusterState state, FetchClusterAction _) => new ClusterState(state.Clusters, null, true, null);