-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
40 lines (40 loc) · 1.15 KB
/
index.d.ts
File metadata and controls
40 lines (40 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import * as k8s from "@kubernetes/client-node";
import { AxiosInstance } from "axios";
export declare enum State {
Deprovisioned = "deprovisioned",
Deprovisioning = "deprovisioning",
FailedDeprovision = "failed-deprovision",
FailedProvision = "failed-provision",
Provisioning = "provisioning",
Running = "running"
}
export interface ClusterExternalRepresentation {
id: string;
displayName: string;
state: State;
connectionDetails?: {
server: string;
};
createdAt: string;
expiresAt: string;
}
export interface KrucibleClientConfig {
apiKeyId: string;
apiKeySecret: string;
accountId: string;
baseURL?: string;
}
export interface CreateClusterConfig {
displayName: string;
}
export interface CreateClusterResult {
cluster: ClusterExternalRepresentation;
kubeConfig: k8s.KubeConfig;
}
declare class KrucibleClient {
requester: AxiosInstance;
constructor(config: KrucibleClientConfig);
createCluster(createConfig: CreateClusterConfig): Promise<CreateClusterResult>;
getReadyCluster(clusterId: string): Promise<ClusterExternalRepresentation>;
}
export default KrucibleClient;