@types/k6 1.1.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- k6/README.md +2 -2
- k6/browser/index.d.ts +2028 -236
- k6/net/grpc/index.d.ts +29 -0
- k6/package.json +8 -3
k6/net/grpc/index.d.ts
CHANGED
|
@@ -104,6 +104,21 @@ export interface GrpcError {
|
|
|
104
104
|
message: string;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Health check status values as defined by the gRPC Health Checking Protocol.
|
|
109
|
+
*/
|
|
110
|
+
export type HealthCheckStatus = "SERVING" | "NOT_SERVING" | "UNKNOWN";
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Response from a gRPC health check.
|
|
114
|
+
*/
|
|
115
|
+
export interface HealthCheckResponse {
|
|
116
|
+
/**
|
|
117
|
+
* The health status of the service.
|
|
118
|
+
*/
|
|
119
|
+
Status: HealthCheckStatus;
|
|
120
|
+
}
|
|
121
|
+
|
|
107
122
|
/**
|
|
108
123
|
* gRPC client to interact with a gRPC server.
|
|
109
124
|
* https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/client/
|
|
@@ -130,6 +145,15 @@ export class Client {
|
|
|
130
145
|
|
|
131
146
|
/** Close the connection. */
|
|
132
147
|
close(): void;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Performs a health check on the gRPC service.
|
|
151
|
+
* Uses the standard gRPC Health Checking Protocol.
|
|
152
|
+
*
|
|
153
|
+
* @param service - Optional service name to check. If not provided, checks overall server health.
|
|
154
|
+
* @returns The health check response
|
|
155
|
+
*/
|
|
156
|
+
healthCheck(service?: string): HealthCheckResponse;
|
|
133
157
|
}
|
|
134
158
|
|
|
135
159
|
/**
|
|
@@ -215,4 +239,9 @@ export const StatusUnavailable: number;
|
|
|
215
239
|
export const StatusDataLoss: number;
|
|
216
240
|
export const StatusUnauthenticated: number;
|
|
217
241
|
|
|
242
|
+
export const HealthCheckServing: HealthCheckStatus;
|
|
243
|
+
export const HealthCheckNotServing: HealthCheckStatus;
|
|
244
|
+
export const HealthCheckUnknown: HealthCheckStatus;
|
|
245
|
+
export const HealthCheckServiceUnkown: HealthCheckStatus;
|
|
246
|
+
|
|
218
247
|
export * as default from "k6/net/grpc";
|
k6/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/k6",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "TypeScript definitions for k6",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"name": "Joan López de la Franca Beltran",
|
|
35
35
|
"githubUsername": "joanlopez",
|
|
36
36
|
"url": "https://github.com/joanlopez"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Agnès Toulet",
|
|
40
|
+
"githubUsername": "AgnesToulet",
|
|
41
|
+
"url": "https://github.com/AgnesToulet"
|
|
37
42
|
}
|
|
38
43
|
],
|
|
39
44
|
"type": "module",
|
|
@@ -69,6 +74,6 @@
|
|
|
69
74
|
"scripts": {},
|
|
70
75
|
"dependencies": {},
|
|
71
76
|
"peerDependencies": {},
|
|
72
|
-
"typesPublisherContentHash": "
|
|
73
|
-
"typeScriptVersion": "5.
|
|
77
|
+
"typesPublisherContentHash": "ee731b1f19868e1c260b125502af21d2ad85651007c16c914bde66d975a5081f",
|
|
78
|
+
"typeScriptVersion": "5.2"
|
|
74
79
|
}
|