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:
parent
0fc9fe626d
commit
550abfcc0d
@ -37,10 +37,12 @@ import { ClusterMetadataKey, initialNodeShellImage, ClusterStatus } from "../com
|
|||||||
import { disposer, storedKubeConfigFolder, toJS } from "../common/utils";
|
import { disposer, storedKubeConfigFolder, toJS } from "../common/utils";
|
||||||
import type { Response } from "request";
|
import type { Response } from "request";
|
||||||
|
|
||||||
export interface ICluster {
|
export interface IHasClusterName {
|
||||||
name: string
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ICluster extends IHasClusterName {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cluster
|
* Cluster
|
||||||
*
|
*
|
||||||
|
|||||||
@ -20,18 +20,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { lifecycleEnum } from "@ogre-tools/injectable";
|
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 type { IInjectable } from "@ogre-tools/injectable";
|
||||||
import clusterInjectable from "./cluster.injectable";
|
import clusterInjectable from "./cluster.injectable";
|
||||||
|
|
||||||
interface IDependencies {
|
interface IDependencies {
|
||||||
cluster: ICluster;
|
cluster: IHasClusterName;
|
||||||
}
|
}
|
||||||
|
|
||||||
const clusterNameInjectable: IInjectable<
|
const clusterNameInjectable: IInjectable<string | undefined, IDependencies> = {
|
||||||
string | undefined,
|
|
||||||
IDependencies
|
|
||||||
> = {
|
|
||||||
getDependencies: di => ({
|
getDependencies: di => ({
|
||||||
cluster: di.inject(clusterInjectable),
|
cluster: di.inject(clusterInjectable),
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user