@daocloud-proto/skoala 0.21.2-44 → 0.21.2-52
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.
|
@@ -54,6 +54,17 @@ export enum ServiceType {
|
|
|
54
54
|
DUBBO = "DUBBO",
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
export enum GovernProtocol {
|
|
58
|
+
GOVERN_PROTOCOL_UNSPECIFIED = "GOVERN_PROTOCOL_UNSPECIFIED",
|
|
59
|
+
GOVERN_TCP = "GOVERN_TCP",
|
|
60
|
+
GOVERN_HTTP = "GOVERN_HTTP",
|
|
61
|
+
GOVERN_HTTP2 = "GOVERN_HTTP2",
|
|
62
|
+
GOVERN_HTTPS = "GOVERN_HTTPS",
|
|
63
|
+
GOVERN_TLS = "GOVERN_TLS",
|
|
64
|
+
GOVERN_GRPC = "GOVERN_GRPC",
|
|
65
|
+
GOVERN_UNSUPPORTED = "GOVERN_UNSUPPORTED",
|
|
66
|
+
}
|
|
67
|
+
|
|
57
68
|
export enum LB {
|
|
58
69
|
UNSPECIFIED = "UNSPECIFIED",
|
|
59
70
|
LEAST_CONN = "LEAST_CONN",
|
|
@@ -223,6 +234,7 @@ export type ListServiceGovern = {
|
|
|
223
234
|
port?: number
|
|
224
235
|
lb?: LB
|
|
225
236
|
updateTime?: number
|
|
237
|
+
protocol?: GovernProtocol
|
|
226
238
|
}
|
|
227
239
|
|
|
228
240
|
export type UpdateServiceGovernReq = {
|
|
@@ -231,9 +243,43 @@ export type UpdateServiceGovernReq = {
|
|
|
231
243
|
namespaceName?: string
|
|
232
244
|
serviceName?: string
|
|
233
245
|
port?: number
|
|
246
|
+
protocol?: GovernProtocol
|
|
234
247
|
lb?: LB
|
|
235
248
|
outlierDetection?: OutlierDetection
|
|
236
249
|
connectionPool?: ConnectionPool
|
|
250
|
+
rewrite?: HTTPRewrite
|
|
251
|
+
timeout?: GoogleProtobufDuration.Duration
|
|
252
|
+
fault?: HTTPFaultInjection
|
|
253
|
+
retries?: HTTPRetry
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export type HTTPRewrite = {
|
|
257
|
+
uri?: string
|
|
258
|
+
authority?: string
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export type HTTPFaultInjection = {
|
|
262
|
+
delay?: HTTPFaultInjection_Delay
|
|
263
|
+
abort?: HTTPFaultInjection_Abort
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export type HTTPFaultInjection_Delay = {
|
|
267
|
+
percentage?: number
|
|
268
|
+
fixedDelay?: GoogleProtobufDuration.Duration
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
type BaseHTTPFaultInjection_Abort = {
|
|
273
|
+
percentage?: number
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export type HTTPFaultInjection_Abort = BaseHTTPFaultInjection_Abort
|
|
277
|
+
& OneOf<{ httpStatus: number; grpcStatus: string; http2Error: string }>
|
|
278
|
+
|
|
279
|
+
export type HTTPRetry = {
|
|
280
|
+
attempts?: number
|
|
281
|
+
perTryTimeout?: GoogleProtobufDuration.Duration
|
|
282
|
+
retryOn?: string
|
|
237
283
|
}
|
|
238
284
|
|
|
239
285
|
export type OutlierDetection = {
|
|
@@ -260,12 +306,18 @@ export type GetServiceGovernReq = {
|
|
|
260
306
|
namespaceName?: string
|
|
261
307
|
serviceName?: string
|
|
262
308
|
port?: number
|
|
309
|
+
protocol?: GovernProtocol
|
|
263
310
|
}
|
|
264
311
|
|
|
265
312
|
export type GetServiceGovernRes = {
|
|
266
313
|
serviceName?: string
|
|
267
314
|
port?: number
|
|
315
|
+
protocol?: GovernProtocol
|
|
268
316
|
lb?: LB
|
|
269
317
|
outlierDetection?: OutlierDetection
|
|
270
318
|
connectionPool?: ConnectionPool
|
|
319
|
+
rewrite?: HTTPRewrite
|
|
320
|
+
timeout?: GoogleProtobufDuration.Duration
|
|
321
|
+
fault?: HTTPFaultInjection
|
|
322
|
+
retries?: HTTPRetry
|
|
271
323
|
}
|
|
@@ -446,10 +446,10 @@ export class Mesh {
|
|
|
446
446
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.ListServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.ListServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "meshId", "namespaceName", "serviceName"])}`, {...initReq, method: "GET"})
|
|
447
447
|
}
|
|
448
448
|
static UpdateServiceGovern(req: SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes> {
|
|
449
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}/ports/${req["port"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
449
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}/ports/${req["port"]}/protocols/${req["protocol"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
450
450
|
}
|
|
451
451
|
static GetServiceGovern(req: SkoalaApiHostedV1alpha1Mesh.GetServiceGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.GetServiceGovernRes> {
|
|
452
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.GetServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.GetServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}/ports/${req["port"]}?${fm.renderURLSearchParams(req, ["workspaceId", "meshId", "namespaceName", "serviceName", "port"])}`, {...initReq, method: "GET"})
|
|
452
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.GetServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.GetServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}/ports/${req["port"]}/protocols/${req["protocol"]}?${fm.renderURLSearchParams(req, ["workspaceId", "meshId", "namespaceName", "serviceName", "port", "protocol"])}`, {...initReq, method: "GET"})
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
export class Plugin {
|