@daocloud-proto/skoala 0.4.1-97 → 0.5.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.
- package/api/general/v1alpha1/common.pb.ts +22 -0
- package/api/general/v1alpha1/skoala.pb.ts +11 -0
- package/api/hosted/v1alpha1/api.pb.ts +58 -71
- package/api/hosted/v1alpha1/apilog.pb.ts +47 -0
- package/api/hosted/v1alpha1/gateway.pb.ts +144 -1
- package/api/hosted/v1alpha1/gatewayservice.pb.ts +170 -0
- package/api/hosted/v1alpha1/http.pb.ts +25 -1
- package/api/skoala/v1alpha1/skoala.pb.ts +46 -2
- package/log/v1alpha1/log.pb.ts +9 -0
- package/package.json +1 -1
- package/resource/v1alpha1/cluster.pb.ts +1 -4
- package/span_metric/v1alpha1/span_metric.pb.ts +0 -39
- package/tracing/v1alpha1/tracing.pb.ts +18 -0
- package/span_metric/v1alpha1/openmetrics.pb.ts +0 -130
|
@@ -28,11 +28,33 @@ export enum Status {
|
|
|
28
28
|
Exception = "Exception",
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export enum ResourceKind {
|
|
32
|
+
RESOURCE_KIND_UNSPECIFIED = "RESOURCE_KIND_UNSPECIFIED",
|
|
33
|
+
Deployment = "Deployment",
|
|
34
|
+
StatefulSet = "StatefulSet",
|
|
35
|
+
DaemonSet = "DaemonSet",
|
|
36
|
+
Pod = "Pod",
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export enum PodPhase {
|
|
40
|
+
POD_PHASE_UNSPECIFIED = "POD_PHASE_UNSPECIFIED",
|
|
41
|
+
PodPhaseUnknown = "PodPhaseUnknown",
|
|
42
|
+
PodPhasePending = "PodPhasePending",
|
|
43
|
+
PodPhaseRunning = "PodPhaseRunning",
|
|
44
|
+
PodPhaseSucceed = "PodPhaseSucceed",
|
|
45
|
+
PodPhaseFailed = "PodPhaseFailed",
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
export type Cluster = {
|
|
32
49
|
id?: string
|
|
33
50
|
name?: string
|
|
34
51
|
}
|
|
35
52
|
|
|
53
|
+
export type Mesh = {
|
|
54
|
+
id?: string
|
|
55
|
+
name?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
36
58
|
export type Workspace = {
|
|
37
59
|
id?: number
|
|
38
60
|
name?: string
|
|
@@ -52,4 +52,15 @@ export type ListNamespaceReq = {
|
|
|
52
52
|
export type ListNamespaceRes = {
|
|
53
53
|
namespaceNames?: string[]
|
|
54
54
|
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type ListMeshReq = {
|
|
58
|
+
workspaceId?: string
|
|
59
|
+
page?: number
|
|
60
|
+
pageSize?: number
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ListMeshRes = {
|
|
64
|
+
meshes?: SkoalaApiGeneralV1alpha1Common.Mesh[]
|
|
65
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
55
66
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
|
|
8
|
+
import * as SkoalaApiHostedV1alpha1Gatewayservice from "./gatewayservice.pb"
|
|
8
9
|
import * as SkoalaApiHostedV1alpha1Http from "./http.pb"
|
|
9
10
|
|
|
10
11
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
@@ -33,18 +34,12 @@ export enum RedirectResponseCode {
|
|
|
33
34
|
PERMANENT_REDIRECT = "PERMANENT_REDIRECT",
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
export enum
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
UNKNOW = "UNKNOW",
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export enum APIStatus {
|
|
46
|
-
UP = "UP",
|
|
47
|
-
DOWN = "DOWN",
|
|
37
|
+
export enum LoadBalancePolicyStrategy {
|
|
38
|
+
Random = "Random",
|
|
39
|
+
RoundRobin = "RoundRobin",
|
|
40
|
+
WeightedLeastRequest = "WeightedLeastRequest",
|
|
41
|
+
Cookie = "Cookie",
|
|
42
|
+
RequestHash = "RequestHash",
|
|
48
43
|
}
|
|
49
44
|
|
|
50
45
|
export type CreateAPIReq = {
|
|
@@ -55,6 +50,49 @@ export type CreateAPIReq = {
|
|
|
55
50
|
apiConfig?: APIConfig
|
|
56
51
|
}
|
|
57
52
|
|
|
53
|
+
export type AdvancedAPIReq = {
|
|
54
|
+
workspaceId?: string
|
|
55
|
+
gatewayName?: string
|
|
56
|
+
clusterName?: string
|
|
57
|
+
namespaceName?: string
|
|
58
|
+
apiName?: string
|
|
59
|
+
advancedApiConfig?: AdvancedAPIConfig
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type AdvancedAPIRes = {
|
|
63
|
+
apiName?: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type TimeoutPolicy = {
|
|
67
|
+
response?: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type PathRewritePolicy = {
|
|
71
|
+
oldPath?: string
|
|
72
|
+
replacement?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type AdvancedAPIConfig = {
|
|
76
|
+
loadBalancePolicy?: LoadBalancePolicy
|
|
77
|
+
timeoutPolicy?: TimeoutPolicy
|
|
78
|
+
pathRewritePolicy?: PathRewritePolicy
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type LoadBalancePolicy = {
|
|
82
|
+
requestHashPolicies?: RequestHashPolicies[]
|
|
83
|
+
strategy?: LoadBalancePolicyStrategy
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type RequestHashPolicies = {
|
|
87
|
+
hashSourceIp?: boolean
|
|
88
|
+
terminal?: boolean
|
|
89
|
+
headerHashPolicy?: HeaderHashPolicy
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type HeaderHashPolicy = {
|
|
93
|
+
headerName?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
58
96
|
export type UpdateAPIReq = {
|
|
59
97
|
apiName?: string
|
|
60
98
|
workspaceId?: string
|
|
@@ -65,12 +103,15 @@ export type UpdateAPIReq = {
|
|
|
65
103
|
}
|
|
66
104
|
|
|
67
105
|
export type CreateAPIRes = {
|
|
106
|
+
apiName?: string
|
|
68
107
|
}
|
|
69
108
|
|
|
70
109
|
export type UpdateAPIRes = {
|
|
110
|
+
apiName?: string
|
|
71
111
|
}
|
|
72
112
|
|
|
73
113
|
export type DeleteAPIRes = {
|
|
114
|
+
apiName?: string
|
|
74
115
|
}
|
|
75
116
|
|
|
76
117
|
export type GetAPIReq = {
|
|
@@ -91,10 +132,11 @@ export type DeleteAPIReq = {
|
|
|
91
132
|
|
|
92
133
|
export type GetAPIRes = {
|
|
93
134
|
apiName?: string
|
|
94
|
-
apiStatus?: APIStatus
|
|
135
|
+
apiStatus?: SkoalaApiHostedV1alpha1Http.APIStatus
|
|
95
136
|
fqdn?: string
|
|
96
137
|
matchRule?: MatchRule
|
|
97
138
|
targetService?: TargetService
|
|
139
|
+
advancedPolicy?: AdvancedAPIConfig
|
|
98
140
|
}
|
|
99
141
|
|
|
100
142
|
export type TargetService = {
|
|
@@ -112,7 +154,7 @@ export type ServiceDetail = {
|
|
|
112
154
|
weight?: string
|
|
113
155
|
nacosNamespaceId?: string
|
|
114
156
|
groupName?: string
|
|
115
|
-
routeType?: RouteType
|
|
157
|
+
routeType?: SkoalaApiHostedV1alpha1Http.RouteType
|
|
116
158
|
path?: string
|
|
117
159
|
statusCode?: number
|
|
118
160
|
}
|
|
@@ -166,52 +208,7 @@ type BaseRouteService = {
|
|
|
166
208
|
}
|
|
167
209
|
|
|
168
210
|
export type RouteService = BaseRouteService
|
|
169
|
-
& OneOf<{ kubernetesService: KubernetesService; registryService: RegistryService; externalService: ExternalService }>
|
|
170
|
-
|
|
171
|
-
export type KubernetesService = {
|
|
172
|
-
clusterId?: string
|
|
173
|
-
clusterName?: string
|
|
174
|
-
namespaceName?: string
|
|
175
|
-
serviceName?: string
|
|
176
|
-
address?: string
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export type ExternalService = {
|
|
180
|
-
serviceName?: string
|
|
181
|
-
address?: string
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
type BaseRegistryService = {
|
|
186
|
-
registryId?: string
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export type RegistryService = BaseRegistryService
|
|
190
|
-
& OneOf<{ eurekaService: EurekaService; nacosService: NacosService; zookeeperService: ZookeeperService; kubernetesService: KubernetesService }>
|
|
191
|
-
|
|
192
|
-
export type EurekaService = {
|
|
193
|
-
address?: string
|
|
194
|
-
serviceName?: string
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export type NacosService = {
|
|
198
|
-
address?: string
|
|
199
|
-
serviceName?: string
|
|
200
|
-
namespaceId?: string
|
|
201
|
-
groupName?: string
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export type ZookeeperService = {
|
|
205
|
-
address?: string
|
|
206
|
-
serviceName?: string
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export type MeshService = {
|
|
210
|
-
instanceId?: string
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export type ApplicationService = {
|
|
214
|
-
}
|
|
211
|
+
& OneOf<{ kubernetesService: SkoalaApiHostedV1alpha1Gatewayservice.KubernetesService; registryService: SkoalaApiHostedV1alpha1Gatewayservice.RegistryService; externalService: SkoalaApiHostedV1alpha1Gatewayservice.ExternalService }>
|
|
215
212
|
|
|
216
213
|
export type RedirectAction = {
|
|
217
214
|
hostname?: string
|
|
@@ -236,16 +233,6 @@ export type APIListReq = {
|
|
|
236
233
|
}
|
|
237
234
|
|
|
238
235
|
export type APIListRes = {
|
|
239
|
-
api?: APIInfo[]
|
|
236
|
+
api?: SkoalaApiHostedV1alpha1Http.APIInfo[]
|
|
240
237
|
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export type APIInfo = {
|
|
244
|
-
apiName?: string
|
|
245
|
-
fqdn?: string
|
|
246
|
-
method?: SkoalaApiHostedV1alpha1Http.HttpMethod[]
|
|
247
|
-
requestPath?: string
|
|
248
|
-
routeType?: RouteType
|
|
249
|
-
apiStatus?: APIStatus
|
|
250
|
-
updatedAt?: string
|
|
251
238
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
|
|
8
|
+
export type SearchLogReq = {
|
|
9
|
+
workspaceId?: string
|
|
10
|
+
gatewayName?: string
|
|
11
|
+
clusterName?: string
|
|
12
|
+
namespaceName?: string
|
|
13
|
+
requestId?: string
|
|
14
|
+
fqdn?: string
|
|
15
|
+
requestPath?: string
|
|
16
|
+
statusCode?: string[]
|
|
17
|
+
requestMethod?: string[]
|
|
18
|
+
message?: string
|
|
19
|
+
startTime?: string
|
|
20
|
+
endTime?: string
|
|
21
|
+
sortOrder?: SortOrder[]
|
|
22
|
+
page?: number
|
|
23
|
+
pageSize?: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type SortOrder = {
|
|
27
|
+
orderBy?: SkoalaApiGeneralV1alpha1Common.OrderBy
|
|
28
|
+
sortBy?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type SearchLogRes = {
|
|
32
|
+
logResult?: LogResult[]
|
|
33
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type LogResult = {
|
|
37
|
+
authority?: string
|
|
38
|
+
userAgent?: string
|
|
39
|
+
gatewayName?: string
|
|
40
|
+
method?: string
|
|
41
|
+
xForwardedFor?: string
|
|
42
|
+
requestId?: string
|
|
43
|
+
path?: string
|
|
44
|
+
upstreamServiceTime?: string
|
|
45
|
+
requestTime?: string
|
|
46
|
+
json?: string
|
|
47
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as InsightIoApiMetricV1alpha1Metric from "../../../metric/v1alpha1/metric.pb"
|
|
7
8
|
import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
|
|
8
9
|
import * as SkoalaApiGeneralV1alpha1Resource from "../../general/v1alpha1/resource.pb"
|
|
9
10
|
import * as SkoalaApiGeneralV1alpha1Service from "../../general/v1alpha1/service.pb"
|
|
@@ -31,6 +32,31 @@ export enum GatewayResource {
|
|
|
31
32
|
Pod = "Pod",
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
export enum QueryResultStatus {
|
|
36
|
+
QUERY_RESULT_STATUS_UNSPECIFIED = "QUERY_RESULT_STATUS_UNSPECIFIED",
|
|
37
|
+
Success = "Success",
|
|
38
|
+
Fail = "Fail",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum AlertTargetType {
|
|
42
|
+
ALERT_TARGET_TYPE_UNSPECIFIED = "ALERT_TARGET_TYPE_UNSPECIFIED",
|
|
43
|
+
AlertTargetGlobal = "AlertTargetGlobal",
|
|
44
|
+
AlertTargetCluster = "AlertTargetCluster",
|
|
45
|
+
AlertTargetNode = "AlertTargetNode",
|
|
46
|
+
AlertTargetDeployment = "AlertTargetDeployment",
|
|
47
|
+
AlertTargetStatefulSet = "AlertTargetStatefulSet",
|
|
48
|
+
AlertTargetDaemonSet = "AlertTargetDaemonSet",
|
|
49
|
+
AlertTargetCronJob = "AlertTargetCronJob",
|
|
50
|
+
AlertTargetPod = "AlertTargetPod",
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export enum AlertSeverity {
|
|
54
|
+
ALERT_SEVERITY_UNSPECIFIED = "ALERT_SEVERITY_UNSPECIFIED",
|
|
55
|
+
Critical = "Critical",
|
|
56
|
+
Warnning = "Warnning",
|
|
57
|
+
Info = "Info",
|
|
58
|
+
}
|
|
59
|
+
|
|
34
60
|
export enum LogLogLevel {
|
|
35
61
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
36
62
|
Trace = "Trace",
|
|
@@ -277,7 +303,7 @@ export type AdvancedConfigPro = {
|
|
|
277
303
|
|
|
278
304
|
export type Log = {
|
|
279
305
|
envoyLogLevel?: LogLogLevel
|
|
280
|
-
|
|
306
|
+
kubernetesDebug?: number
|
|
281
307
|
contourDebug?: boolean
|
|
282
308
|
logToInsight?: boolean
|
|
283
309
|
}
|
|
@@ -360,4 +386,121 @@ export type GatewayDiagnosticReq = {
|
|
|
360
386
|
|
|
361
387
|
export type GatewayDiagnosticRes = {
|
|
362
388
|
tips?: string
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export type PodSummary = {
|
|
392
|
+
podName?: string
|
|
393
|
+
namespaceName?: string
|
|
394
|
+
phase?: SkoalaApiGeneralV1alpha1Common.PodPhase
|
|
395
|
+
podIp?: string
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export type ListPodsReq = {
|
|
399
|
+
workspaceId?: string
|
|
400
|
+
clusterName?: string
|
|
401
|
+
namespaceName?: string
|
|
402
|
+
gatewayName?: string
|
|
403
|
+
phases?: SkoalaApiGeneralV1alpha1Common.PodPhase[]
|
|
404
|
+
page?: number
|
|
405
|
+
pageSize?: number
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export type ListPodsRes = {
|
|
409
|
+
items?: PodSummary[]
|
|
410
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export type GetPodReq = {
|
|
414
|
+
workspaceId?: string
|
|
415
|
+
clusterName?: string
|
|
416
|
+
namespaceName?: string
|
|
417
|
+
gatewayName?: string
|
|
418
|
+
podName?: string
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export type GetPodRes = {
|
|
422
|
+
podName?: string
|
|
423
|
+
workspaceId?: string
|
|
424
|
+
clusterName?: string
|
|
425
|
+
namespaceName?: string
|
|
426
|
+
phase?: SkoalaApiGeneralV1alpha1Common.PodPhase
|
|
427
|
+
createTime?: number
|
|
428
|
+
podIp?: string
|
|
429
|
+
hostIp?: string
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export type QueryGatewayPodMetricReq = {
|
|
433
|
+
workspaceId?: string
|
|
434
|
+
clusterId?: string
|
|
435
|
+
namespaceName?: string
|
|
436
|
+
gatewayName?: string
|
|
437
|
+
podName?: string
|
|
438
|
+
atTime?: number
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export type QueryGatewayPodMetricRes = {
|
|
442
|
+
items?: QueryMetricResult[]
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export type QueryGatewayPodMetricRangeReq = {
|
|
446
|
+
workspaceId?: string
|
|
447
|
+
clusterId?: string
|
|
448
|
+
namespaceName?: string
|
|
449
|
+
gatewayName?: string
|
|
450
|
+
podName?: string
|
|
451
|
+
startTime?: number
|
|
452
|
+
endTime?: number
|
|
453
|
+
step?: number
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export type QueryGatewayPodMetricRangeRes = {
|
|
457
|
+
items?: QueryMetricRangeResult[]
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export type QueryMetricResult = {
|
|
461
|
+
vector?: InsightIoApiMetricV1alpha1Metric.Sample[]
|
|
462
|
+
status?: QueryResultStatus
|
|
463
|
+
errorMessage?: string
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export type QueryMetricRangeResult = {
|
|
467
|
+
matrix?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
|
|
468
|
+
status?: QueryResultStatus
|
|
469
|
+
errorMessage?: string
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export type QueryGatewayDeploymentsMetricRangeReq = {
|
|
473
|
+
workspaceId?: string
|
|
474
|
+
clusterId?: string
|
|
475
|
+
namespaceName?: string
|
|
476
|
+
gatewayName?: string
|
|
477
|
+
startTime?: number
|
|
478
|
+
endTime?: number
|
|
479
|
+
step?: number
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export type QueryGatewayDeploymentsMetricRangeRes = {
|
|
483
|
+
contour?: QueryMetricRangeResult[]
|
|
484
|
+
envoy?: QueryMetricRangeResult[]
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export type GatewayPodAlertReq = {
|
|
488
|
+
workspaceId?: string
|
|
489
|
+
clusterName?: string
|
|
490
|
+
namespaceName?: string
|
|
491
|
+
gatewayName?: string
|
|
492
|
+
podName?: string
|
|
493
|
+
startTime?: number
|
|
494
|
+
endTime?: number
|
|
495
|
+
step?: number
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export type GatewayPodAlertRes = {
|
|
499
|
+
items?: Alert[]
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export type Alert = {
|
|
503
|
+
startTime?: number
|
|
504
|
+
endTime?: number
|
|
505
|
+
stats?: {[key: string]: string}
|
|
363
506
|
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
|
|
8
|
+
import * as SkoalaApiHostedV1alpha1Http from "./http.pb"
|
|
9
|
+
|
|
10
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
11
|
+
type OneOf<T> =
|
|
12
|
+
| { [k in keyof T]?: undefined }
|
|
13
|
+
| (
|
|
14
|
+
keyof T extends infer K ?
|
|
15
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
16
|
+
: never)
|
|
17
|
+
: never);
|
|
18
|
+
|
|
19
|
+
export enum ServiceSource {
|
|
20
|
+
SOURCE_CLUSTER = "SOURCE_CLUSTER",
|
|
21
|
+
SOURCE_MESH = "SOURCE_MESH",
|
|
22
|
+
SOURCE_REGISTRY = "SOURCE_REGISTRY",
|
|
23
|
+
SOURCE_EXTERNAL = "SOURCE_EXTERNAL",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum SesameServiceType {
|
|
27
|
+
EXTERNAL_SERVICE = "EXTERNAL_SERVICE",
|
|
28
|
+
MANAGE_SERVICE = "MANAGE_SERVICE",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type CreateExternalServiceReq = {
|
|
32
|
+
workspaceId?: string
|
|
33
|
+
gatewayName?: string
|
|
34
|
+
clusterName?: string
|
|
35
|
+
namespaceName?: string
|
|
36
|
+
externalServiceConf?: ExternalServiceConf
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type CreateExternalServiceRes = {
|
|
40
|
+
serviceName?: string
|
|
41
|
+
namespaceName?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type GetGatewayServiceReq = {
|
|
45
|
+
workspaceId?: string
|
|
46
|
+
clusterName?: string
|
|
47
|
+
gatewayName?: string
|
|
48
|
+
namespaceName?: string
|
|
49
|
+
serviceName?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type UpdateGatewayServiceReq = {
|
|
53
|
+
workspaceId?: string
|
|
54
|
+
clusterName?: string
|
|
55
|
+
gatewayName?: string
|
|
56
|
+
namespaceName?: string
|
|
57
|
+
serviceName?: string
|
|
58
|
+
externalServiceConf?: ExternalServiceConf
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type UpdateGatewayServiceRes = {
|
|
62
|
+
serviceName?: string
|
|
63
|
+
namespaceName?: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type DeleteGatewayServiceReq = {
|
|
67
|
+
workspaceId?: string
|
|
68
|
+
clusterName?: string
|
|
69
|
+
gatewayName?: string
|
|
70
|
+
namespaceName?: string
|
|
71
|
+
serviceName?: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type DeleteGatewayServiceRes = {
|
|
75
|
+
serviceName?: string
|
|
76
|
+
namespaceName?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type GetGatewayServiceRes = {
|
|
80
|
+
serviceInfo?: ServiceInfo
|
|
81
|
+
api?: SkoalaApiHostedV1alpha1Http.APIInfo[]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type ListGatewayServiceReq = {
|
|
85
|
+
workspaceId?: string
|
|
86
|
+
clusterName?: string
|
|
87
|
+
gatewayName?: string
|
|
88
|
+
namespaceName?: string
|
|
89
|
+
serviceName?: string
|
|
90
|
+
serviceType?: SesameServiceType
|
|
91
|
+
page?: number
|
|
92
|
+
pageSize?: number
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type ListGatewayServiceRes = {
|
|
96
|
+
serviceInfo?: ServiceInfo[]
|
|
97
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type ServiceInfo = {
|
|
101
|
+
serviceName?: string
|
|
102
|
+
address?: Address
|
|
103
|
+
apiCount?: number
|
|
104
|
+
sourceInfo?: ServiceSourceInfo
|
|
105
|
+
createAt?: string
|
|
106
|
+
serviceType?: SesameServiceType
|
|
107
|
+
sesameServiceName?: string
|
|
108
|
+
sesameServiceNamespace?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type ServiceSourceInfo = {
|
|
112
|
+
serviceSource?: ServiceSource
|
|
113
|
+
clusterName?: string
|
|
114
|
+
k8SNamespaceName?: string
|
|
115
|
+
registrationId?: string
|
|
116
|
+
registrationType?: string
|
|
117
|
+
nacosNamespaceId?: string
|
|
118
|
+
groupName?: string
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
type BaseExternalServiceConf = {
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type ExternalServiceConf = BaseExternalServiceConf
|
|
126
|
+
& OneOf<{ kubernetesService: KubernetesService; registryService: RegistryService; externalService: ExternalService }>
|
|
127
|
+
|
|
128
|
+
export type KubernetesService = {
|
|
129
|
+
clusterId?: string
|
|
130
|
+
clusterName?: string
|
|
131
|
+
namespaceName?: string
|
|
132
|
+
serviceName?: string
|
|
133
|
+
address?: Address
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
type BaseRegistryService = {
|
|
138
|
+
registrationId?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type RegistryService = BaseRegistryService
|
|
142
|
+
& OneOf<{ eurekaService: EurekaService; nacosService: NacosService; zookeeperService: ZookeeperService; kubernetesService: KubernetesService }>
|
|
143
|
+
|
|
144
|
+
export type EurekaService = {
|
|
145
|
+
address?: Address
|
|
146
|
+
serviceName?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type NacosService = {
|
|
150
|
+
address?: Address
|
|
151
|
+
serviceName?: string
|
|
152
|
+
namespaceId?: string
|
|
153
|
+
groupName?: string
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type ZookeeperService = {
|
|
157
|
+
address?: Address
|
|
158
|
+
serviceName?: string
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type ExternalService = {
|
|
162
|
+
serviceName?: string
|
|
163
|
+
address?: Address
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type Address = {
|
|
167
|
+
protocol?: SkoalaApiHostedV1alpha1Http.Protocol
|
|
168
|
+
hostname?: string
|
|
169
|
+
port?: number
|
|
170
|
+
}
|
|
@@ -10,11 +10,35 @@ export enum HttpMethod {
|
|
|
10
10
|
DELETE = "DELETE",
|
|
11
11
|
PUT = "PUT",
|
|
12
12
|
PATCH = "PATCH",
|
|
13
|
-
|
|
13
|
+
OPTIONS = "OPTIONS",
|
|
14
14
|
ALL = "ALL",
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export enum Protocol {
|
|
18
18
|
HTTP = "HTTP",
|
|
19
19
|
HTTPS = "HTTPS",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum RouteType {
|
|
23
|
+
CLUSTRE_SERVER = "CLUSTRE_SERVER",
|
|
24
|
+
DIRECT = "DIRECT",
|
|
25
|
+
REDIRECT = "REDIRECT",
|
|
26
|
+
EXTERNAL = "EXTERNAL",
|
|
27
|
+
REGISTRY = "REGISTRY",
|
|
28
|
+
UNKNOW = "UNKNOW",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum APIStatus {
|
|
32
|
+
UP = "UP",
|
|
33
|
+
DOWN = "DOWN",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type APIInfo = {
|
|
37
|
+
apiName?: string
|
|
38
|
+
fqdn?: string
|
|
39
|
+
method?: HttpMethod[]
|
|
40
|
+
requestPath?: string
|
|
41
|
+
routeType?: RouteType
|
|
42
|
+
apiStatus?: APIStatus
|
|
43
|
+
updatedAt?: string
|
|
20
44
|
}
|
|
@@ -9,7 +9,9 @@ import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
|
9
9
|
import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
|
|
10
10
|
import * as SkoalaApiGeneralV1alpha1Version from "../../general/v1alpha1/version.pb"
|
|
11
11
|
import * as SkoalaApiHostedV1alpha1Api from "../../hosted/v1alpha1/api.pb"
|
|
12
|
+
import * as SkoalaApiHostedV1alpha1Apilog from "../../hosted/v1alpha1/apilog.pb"
|
|
12
13
|
import * as SkoalaApiHostedV1alpha1Gateway from "../../hosted/v1alpha1/gateway.pb"
|
|
14
|
+
import * as SkoalaApiHostedV1alpha1Gatewayservice from "../../hosted/v1alpha1/gatewayservice.pb"
|
|
13
15
|
import * as SkoalaApiHostedV1alpha1Nacos from "../../hosted/v1alpha1/nacos.pb"
|
|
14
16
|
import * as SkoalaApiHostedV1alpha1Sentinel from "../../hosted/v1alpha1/sentinel.pb"
|
|
15
17
|
import * as SkoalaApiHostedV1alpha1Virtualhost from "../../hosted/v1alpha1/virtualhost.pb"
|
|
@@ -30,6 +32,9 @@ export class Skoala {
|
|
|
30
32
|
static ListCluster(req: SkoalaApiGeneralV1alpha1Skoala.ListClusterReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListClusterRes> {
|
|
31
33
|
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListClusterReq, SkoalaApiGeneralV1alpha1Skoala.ListClusterRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
32
34
|
}
|
|
35
|
+
static ListMesh(req: SkoalaApiGeneralV1alpha1Skoala.ListMeshReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListMeshRes> {
|
|
36
|
+
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListMeshReq, SkoalaApiGeneralV1alpha1Skoala.ListMeshRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
37
|
+
}
|
|
33
38
|
static ListClusterNamespace(req: SkoalaApiGeneralV1alpha1Skoala.ListNamespaceReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListNamespaceRes> {
|
|
34
39
|
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListNamespaceReq, SkoalaApiGeneralV1alpha1Skoala.ListNamespaceRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName"])}`, {...initReq, method: "GET"})
|
|
35
40
|
}
|
|
@@ -121,7 +126,7 @@ export class Gateway {
|
|
|
121
126
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListAllGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/gateways?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
122
127
|
}
|
|
123
128
|
static ListClusterGateway(req: SkoalaApiHostedV1alpha1Gateway.ListClusterGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListGatewayRes> {
|
|
124
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListClusterGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways
|
|
129
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListClusterGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
125
130
|
}
|
|
126
131
|
static Get(req: SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetGatewayRes> {
|
|
127
132
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, SkoalaApiHostedV1alpha1Gateway.GetGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
@@ -142,7 +147,40 @@ export class Gateway {
|
|
|
142
147
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusReq, SkoalaApiHostedV1alpha1Gateway.GetGatewayStatusRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/status?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
143
148
|
}
|
|
144
149
|
static Diagnostic(req: SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticRes> {
|
|
145
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticReq, SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/diagnostic`, {...initReq, method: "
|
|
150
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticReq, SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/diagnostic`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
151
|
+
}
|
|
152
|
+
static ListGatewayPods(req: SkoalaApiHostedV1alpha1Gateway.ListPodsReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListPodsRes> {
|
|
153
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListPodsReq, SkoalaApiHostedV1alpha1Gateway.ListPodsRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/pods?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
154
|
+
}
|
|
155
|
+
static GetGatewayPod(req: SkoalaApiHostedV1alpha1Gateway.GetPodReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetPodRes> {
|
|
156
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetPodReq, SkoalaApiHostedV1alpha1Gateway.GetPodRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/pods/${req["podName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName", "podName"])}`, {...initReq, method: "GET"})
|
|
157
|
+
}
|
|
158
|
+
static GetGatewayPodAlert(req: SkoalaApiHostedV1alpha1Gateway.GatewayPodAlertReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GatewayPodAlertRes> {
|
|
159
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GatewayPodAlertReq, SkoalaApiHostedV1alpha1Gateway.GatewayPodAlertRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/alert/pods/${req["podName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName", "podName"])}`, {...initReq, method: "GET"})
|
|
160
|
+
}
|
|
161
|
+
static QueryGatewayDeploymentsMetricRange(req: SkoalaApiHostedV1alpha1Gateway.QueryGatewayDeploymentsMetricRangeReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.QueryGatewayDeploymentsMetricRangeRes> {
|
|
162
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.QueryGatewayDeploymentsMetricRangeReq, SkoalaApiHostedV1alpha1Gateway.QueryGatewayDeploymentsMetricRangeRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterId"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/metric/deployments/queryrange?${fm.renderURLSearchParams(req, ["workspaceId", "clusterId", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
163
|
+
}
|
|
164
|
+
static QueryGatewayPodMetricRange(req: SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRangeReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRangeRes> {
|
|
165
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRangeReq, SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRangeRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterId"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/metric/pods/${req["podName"]}/queryrange?${fm.renderURLSearchParams(req, ["workspaceId", "clusterId", "namespaceName", "gatewayName", "podName"])}`, {...initReq, method: "GET"})
|
|
166
|
+
}
|
|
167
|
+
static QueryGatewayPodMetric(req: SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRes> {
|
|
168
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricReq, SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterId"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/metric/pods/${req["podName"]}/query?${fm.renderURLSearchParams(req, ["workspaceId", "clusterId", "namespaceName", "gatewayName", "podName"])}`, {...initReq, method: "GET"})
|
|
169
|
+
}
|
|
170
|
+
static CreateService(req: SkoalaApiHostedV1alpha1Gatewayservice.CreateExternalServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gatewayservice.CreateExternalServiceRes> {
|
|
171
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gatewayservice.CreateExternalServiceReq, SkoalaApiHostedV1alpha1Gatewayservice.CreateExternalServiceRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/services`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
172
|
+
}
|
|
173
|
+
static ListService(req: SkoalaApiHostedV1alpha1Gatewayservice.ListGatewayServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gatewayservice.ListGatewayServiceRes> {
|
|
174
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gatewayservice.ListGatewayServiceReq, SkoalaApiHostedV1alpha1Gatewayservice.ListGatewayServiceRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/services?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
175
|
+
}
|
|
176
|
+
static GetService(req: SkoalaApiHostedV1alpha1Gatewayservice.GetGatewayServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gatewayservice.GetGatewayServiceRes> {
|
|
177
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gatewayservice.GetGatewayServiceReq, SkoalaApiHostedV1alpha1Gatewayservice.GetGatewayServiceRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/services/${req["serviceName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName", "serviceName"])}`, {...initReq, method: "GET"})
|
|
178
|
+
}
|
|
179
|
+
static UpdateService(req: SkoalaApiHostedV1alpha1Gatewayservice.UpdateGatewayServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gatewayservice.UpdateGatewayServiceRes> {
|
|
180
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gatewayservice.UpdateGatewayServiceReq, SkoalaApiHostedV1alpha1Gatewayservice.UpdateGatewayServiceRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/services/${req["serviceName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
181
|
+
}
|
|
182
|
+
static DeleteService(req: SkoalaApiHostedV1alpha1Gatewayservice.DeleteGatewayServiceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gatewayservice.DeleteGatewayServiceRes> {
|
|
183
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gatewayservice.DeleteGatewayServiceReq, SkoalaApiHostedV1alpha1Gatewayservice.DeleteGatewayServiceRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/services/${req["serviceName"]}`, {...initReq, method: "DELETE"})
|
|
146
184
|
}
|
|
147
185
|
static CreateVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostRes> {
|
|
148
186
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostReq, SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/virtualhosts`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -174,4 +212,10 @@ export class Gateway {
|
|
|
174
212
|
static UpdateAPI(req: SkoalaApiHostedV1alpha1Api.UpdateAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.UpdateAPIRes> {
|
|
175
213
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Api.UpdateAPIReq, SkoalaApiHostedV1alpha1Api.UpdateAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
176
214
|
}
|
|
215
|
+
static UpdateAPIPolicy(req: SkoalaApiHostedV1alpha1Api.AdvancedAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Api.AdvancedAPIRes> {
|
|
216
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Api.AdvancedAPIReq, SkoalaApiHostedV1alpha1Api.AdvancedAPIRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/apis/${req["apiName"]}/policies`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
217
|
+
}
|
|
218
|
+
static ListGatewayLog(req: SkoalaApiHostedV1alpha1Apilog.SearchLogReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Apilog.SearchLogRes> {
|
|
219
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Apilog.SearchLogReq, SkoalaApiHostedV1alpha1Apilog.SearchLogRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}/requestlogs?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
220
|
+
}
|
|
177
221
|
}
|
package/log/v1alpha1/log.pb.ts
CHANGED
|
@@ -14,6 +14,15 @@ type OneOf<T> =
|
|
|
14
14
|
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
15
|
: never)
|
|
16
16
|
: never);
|
|
17
|
+
export type SearchLogRequest = {
|
|
18
|
+
index?: string
|
|
19
|
+
query?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type SearchLogResponse = {
|
|
23
|
+
response?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
17
26
|
export type LogQueryResourceFilter = {
|
|
18
27
|
logSearch?: string[]
|
|
19
28
|
clusterFilter?: string[]
|
package/package.json
CHANGED
|
@@ -65,12 +65,9 @@ export type ClusterSummary = {
|
|
|
65
65
|
name?: string
|
|
66
66
|
kubeSystemId?: string
|
|
67
67
|
phase?: ClusterPhase
|
|
68
|
-
provider?: ClusterProvider
|
|
69
|
-
kubernetesVersion?: string
|
|
70
|
-
creationTimestamp?: string
|
|
71
68
|
nodeNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
|
|
72
|
-
podNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
|
|
73
69
|
insightAgentStatus?: InsightAgentStatus
|
|
70
|
+
insightAgentCreateTime?: string
|
|
74
71
|
}
|
|
75
72
|
|
|
76
73
|
export type ClusterDetail = {
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import * as GoogleProtobufDuration from "../../google/protobuf/duration.pb"
|
|
8
7
|
import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
|
|
9
|
-
import * as InsightIoApiSpan_metricV1alpha1Openmetrics from "./openmetrics.pb"
|
|
10
8
|
import * as InsightIoApiSpan_metricV1alpha1Otelspankind from "./otelspankind.pb"
|
|
11
9
|
export type MetricsQueryBaseRequest = {
|
|
12
10
|
cluster?: string
|
|
@@ -22,26 +20,6 @@ export type MetricsQueryBaseRequest = {
|
|
|
22
20
|
spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
export type GetLatenciesRequest = {
|
|
26
|
-
baseRequest?: MetricsQueryBaseRequest
|
|
27
|
-
quantile?: number
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type GetCallRatesRequest = {
|
|
31
|
-
baseRequest?: MetricsQueryBaseRequest
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type GetErrorRatesRequest = {
|
|
35
|
-
baseRequest?: MetricsQueryBaseRequest
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type GetMinStepDurationRequest = {
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type GetMinStepDurationResponse = {
|
|
42
|
-
minStep?: GoogleProtobufDuration.Duration
|
|
43
|
-
}
|
|
44
|
-
|
|
45
23
|
export type GetApdexRequest = {
|
|
46
24
|
cluster?: string
|
|
47
25
|
namespace?: string
|
|
@@ -52,19 +30,6 @@ export type GetApdexRequest = {
|
|
|
52
30
|
extensionFilters?: string
|
|
53
31
|
}
|
|
54
32
|
|
|
55
|
-
export type GetMetricsResponse = {
|
|
56
|
-
metrics?: InsightIoApiSpan_metricV1alpha1Openmetrics.MetricFamily
|
|
57
|
-
metricsWithOperation?: MetricsFamilyWithOperation
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export type MetricsFamilyWithOperation = {
|
|
61
|
-
name?: string
|
|
62
|
-
type?: InsightIoApiSpan_metricV1alpha1Openmetrics.MetricType
|
|
63
|
-
unit?: string
|
|
64
|
-
help?: string
|
|
65
|
-
metrics?: MetricsWithOperation[]
|
|
66
|
-
}
|
|
67
|
-
|
|
68
33
|
export type MetricsWithOperation = {
|
|
69
34
|
operationName?: string
|
|
70
35
|
metricGroups?: MetricsGroup[]
|
|
@@ -76,10 +41,6 @@ export type MetricsGroup = {
|
|
|
76
41
|
metricsAvg?: number
|
|
77
42
|
}
|
|
78
43
|
|
|
79
|
-
export type GetServiceDetailRequest = {
|
|
80
|
-
baseRequest?: MetricsQueryBaseRequest
|
|
81
|
-
}
|
|
82
|
-
|
|
83
44
|
export type GetServiceDetailResponse = {
|
|
84
45
|
p95Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
|
|
85
46
|
p75Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
export type QueryBaseRequest = {
|
|
7
|
+
cluster?: string
|
|
8
|
+
namespace?: string
|
|
9
|
+
serviceName?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type OperationsQueryResponse = {
|
|
13
|
+
operations?: string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type TraceRequestById = {
|
|
17
|
+
traceId?: string
|
|
18
|
+
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/*
|
|
4
|
-
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb"
|
|
8
|
-
|
|
9
|
-
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
10
|
-
type OneOf<T> =
|
|
11
|
-
| { [k in keyof T]?: undefined }
|
|
12
|
-
| (
|
|
13
|
-
keyof T extends infer K ?
|
|
14
|
-
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
|
-
: never)
|
|
16
|
-
: never);
|
|
17
|
-
|
|
18
|
-
export enum MetricType {
|
|
19
|
-
UNKNOWN = "UNKNOWN",
|
|
20
|
-
GAUGE = "GAUGE",
|
|
21
|
-
COUNTER = "COUNTER",
|
|
22
|
-
STATE_SET = "STATE_SET",
|
|
23
|
-
INFO = "INFO",
|
|
24
|
-
HISTOGRAM = "HISTOGRAM",
|
|
25
|
-
GAUGE_HISTOGRAM = "GAUGE_HISTOGRAM",
|
|
26
|
-
SUMMARY = "SUMMARY",
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type MetricSet = {
|
|
30
|
-
metricFamilies?: MetricFamily[]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type MetricFamily = {
|
|
34
|
-
name?: string
|
|
35
|
-
type?: MetricType
|
|
36
|
-
unit?: string
|
|
37
|
-
help?: string
|
|
38
|
-
metrics?: Metric[]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type Metric = {
|
|
42
|
-
labels?: Label[]
|
|
43
|
-
metricPoints?: MetricPoint[]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type Label = {
|
|
47
|
-
name?: string
|
|
48
|
-
value?: string
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
type BaseMetricPoint = {
|
|
53
|
-
timestamp?: GoogleProtobufTimestamp.Timestamp
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type MetricPoint = BaseMetricPoint
|
|
57
|
-
& OneOf<{ unknownValue: UnknownValue; gaugeValue: GaugeValue; counterValue: CounterValue; histogramValue: HistogramValue; stateSetValue: StateSetValue; infoValue: InfoValue; summaryValue: SummaryValue }>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
type BaseUnknownValue = {
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export type UnknownValue = BaseUnknownValue
|
|
64
|
-
& OneOf<{ doubleValue: number; intValue: string }>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
type BaseGaugeValue = {
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export type GaugeValue = BaseGaugeValue
|
|
71
|
-
& OneOf<{ doubleValue: number; intValue: string }>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
type BaseCounterValue = {
|
|
75
|
-
created?: GoogleProtobufTimestamp.Timestamp
|
|
76
|
-
exemplar?: Exemplar
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type CounterValue = BaseCounterValue
|
|
80
|
-
& OneOf<{ doubleValue: number; intValue: string }>
|
|
81
|
-
|
|
82
|
-
export type HistogramValueBucket = {
|
|
83
|
-
count?: string
|
|
84
|
-
upperBound?: number
|
|
85
|
-
exemplar?: Exemplar
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
type BaseHistogramValue = {
|
|
90
|
-
count?: string
|
|
91
|
-
created?: GoogleProtobufTimestamp.Timestamp
|
|
92
|
-
buckets?: HistogramValueBucket[]
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export type HistogramValue = BaseHistogramValue
|
|
96
|
-
& OneOf<{ doubleValue: number; intValue: string }>
|
|
97
|
-
|
|
98
|
-
export type Exemplar = {
|
|
99
|
-
value?: number
|
|
100
|
-
timestamp?: GoogleProtobufTimestamp.Timestamp
|
|
101
|
-
label?: Label[]
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type StateSetValueState = {
|
|
105
|
-
enabled?: boolean
|
|
106
|
-
name?: string
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export type StateSetValue = {
|
|
110
|
-
states?: StateSetValueState[]
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export type InfoValue = {
|
|
114
|
-
info?: Label[]
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export type SummaryValueQuantile = {
|
|
118
|
-
quantile?: number
|
|
119
|
-
value?: number
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
type BaseSummaryValue = {
|
|
124
|
-
count?: string
|
|
125
|
-
created?: GoogleProtobufTimestamp.Timestamp
|
|
126
|
-
quantile?: SummaryValueQuantile[]
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export type SummaryValue = BaseSummaryValue
|
|
130
|
-
& OneOf<{ doubleValue: number; intValue: string }>
|