Exemple #1
0
        public async Task HandleCreateClusterAction(CreateClusterAction action, IDispatcher dispatcher)
        {
            try
            {
                var clusterReactionResult = await clusterService.CreateClustersAsync(action.Request);

                if (clusterReactionResult)
                {
                    dispatcher.Dispatch(new FetchClustersAction());
                }
            }
            catch (Exception e)
            {
                dispatcher.Dispatch(new CreateClusterFailureAction(e.Message));
            }
        }
Exemple #2
0
 public static ClusterState ReduceCreateClusterAction(ClusterState state, CreateClusterAction _) =>
 new ClusterState(state.Clusters, state.Cluster, true, null);