refactor ipc module

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2020-11-04 18:43:23 +02:00
1 parent 02b9ac6b8b
commit cae880ad85
18 files changed
+176 -214

No files matched your search

+2 -6
View File
@@ -4,7 +4,7 @@ import type { IMetricsReqParams } from "../renderer/api/endpoints/metrics.api";
import type { WorkspaceId } from "../common/workspace-store";
import { action, computed, observable, reaction, toJS, when } from "mobx";
import { apiKubePrefix } from "../common/vars";
import { broadcastIpc } from "../common/ipc";
import { broadcastMessage } from "../common/ipc";
import { ContextHandler } from "./context-handler"
import { AuthorizationV1Api, CoreV1Api, KubeConfig, V1ResourceAttributes } from "@kubernetes/client-node"
import { Kubectl } from "./kubectl";
@@ -405,11 +405,7 @@ export class Cluster implements ClusterModel, ClusterState {
pushState(state = this.getState()) {
logger.silly(`[CLUSTER]: push-state`, state);
broadcastIpc({
channel: "cluster:state",
frameId: this.frameId,
args: [this.id, state],
})
broadcastMessage("cluster:state", this.id, state)
}
// get cluster system meta, e.g. use in "logger"