Exemplo n.º 1
0
        public async Task HandleFetchClustersAction(FetchClustersAction action, IDispatcher dispatcher)
        {
            try
            {
                var clusters = await clusterService.GetClustersAsync();

                dispatcher.Dispatch(new FetchClustersSuccessAction(clusters));
            }
            catch (Exception e)
            {
                dispatcher.Dispatch(new FetchClustersFailureAction(e.Message));
            }
        }
Exemplo n.º 2
0
 public static ClusterState ReduceFetchClustersAction(ClusterState state, FetchClustersAction _) =>
 new ClusterState(null, state.Cluster, true, null);