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 type { Response } from "request";
|
||||
|
||||
export interface ICluster {
|
||||
name: string
|
||||
export interface IHasClusterName {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface ICluster extends IHasClusterName {}
|
||||
|
||||
/**
|
||||
* Cluster
|
||||
*
|
||||
|
||||
@ -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),
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user