2018-05-24 06:44:13 +00:00
|
|
|
import { RPCClientError } from '@loafer/ng-rpc';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
2018-05-02 08:09:39 +00:00
|
|
|
import { DiscoveryStartInfo } from '@overflow/commons-typescript/model/discovery';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
|
|
|
export interface State {
|
|
|
|
isStart: boolean;
|
|
|
|
error: RPCClientError | null;
|
|
|
|
isPending: boolean;
|
|
|
|
discoveryStartInfo: DiscoveryStartInfo | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const initialState: State = {
|
|
|
|
isStart: false,
|
|
|
|
error: null,
|
|
|
|
isPending: false,
|
|
|
|
discoveryStartInfo: null,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const isStart = (state: State) => state.isStart;
|
|
|
|
export const getDiscoveryStartInfo = (state: State) => state.discoveryStartInfo;
|
|
|
|
export const getError = (state: State) => state.error;
|
|
|
|
export const isPending = (state: State) => state.isPending;
|