1 | import { Args } from './types/common';
|
2 | import { Cluster } from './Cluster';
|
3 | import { IOutput } from './Output';
|
4 | import 'isomorphic-fetch';
|
5 | import { RC } from './index';
|
6 | export declare class Environment {
|
7 | sharedClusters: string[];
|
8 | clusterEndpointMap: {
|
9 | [key: string]: string;
|
10 | };
|
11 | args: Args;
|
12 | activeCluster: Cluster;
|
13 | globalRC: RC;
|
14 | clusters: Cluster[];
|
15 | out: IOutput;
|
16 | home: string;
|
17 | rcPath: string;
|
18 | clustersFetched: boolean;
|
19 | version?: string;
|
20 | constructor(home: string, out?: IOutput, version?: string);
|
21 | load(): Promise<void>;
|
22 | get cloudSessionKey(): string | undefined;
|
23 | renewToken(): Promise<void>;
|
24 | fetchClusters(): Promise<void>;
|
25 | clusterByName(name: string, throws?: boolean): Cluster | undefined;
|
26 | setToken(token: string | undefined): void;
|
27 | addCluster(cluster: Cluster): void;
|
28 | removeCluster(name: string): void;
|
29 | saveGlobalRC(): void;
|
30 | setActiveCluster(cluster: Cluster): void;
|
31 | loadGlobalRC(): Promise<void>;
|
32 | parseGlobalRC(globalFile?: string): Promise<void>;
|
33 | private loadYaml;
|
34 | private initClusters;
|
35 | private getSharedClusters;
|
36 | private getLocalClusterConfig;
|
37 | private requestCloudApi;
|
38 | }
|
39 | export declare const isLocal: (hostname: any) => any;
|