1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Organize some interfaces to communicate intent

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2021-11-16 13:27:30 +02:00
parent 0fc9fe626d
commit 550abfcc0d
2 changed files with 7 additions and 8 deletions

View File

@ -37,10 +37,12 @@ import { ClusterMetadataKey, initialNodeShellImage, ClusterStatus } from "../com
import { disposer, storedKubeConfigFolder, toJS } from "../common/utils";
import type { Response } from "request";
export interface ICluster {
name: string
export interface IHasClusterName {
name: string;
}
export interface ICluster extends IHasClusterName {}
/**
* Cluster
*

View File

@ -20,18 +20,15 @@
*/
import { lifecycleEnum } from "@ogre-tools/injectable";
import type { ICluster } from "../../../../main/cluster";
import type { IHasClusterName } from "../../../../main/cluster";
import type { IInjectable } from "@ogre-tools/injectable";
import clusterInjectable from "./cluster.injectable";
interface IDependencies {
cluster: ICluster;
cluster: IHasClusterName;
}
const clusterNameInjectable: IInjectable<
string | undefined,
IDependencies
> = {
const clusterNameInjectable: IInjectable<string | undefined, IDependencies> = {
getDependencies: di => ({
cluster: di.inject(clusterInjectable),
}),