@daocloud-proto/skoala 0.4.1-103 → 0.4.1-109

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.
@@ -28,6 +28,23 @@ 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
@@ -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",
@@ -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
  }
@@ -143,7 +143,25 @@ export class Gateway {
143
143
  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"})
144
144
  }
145
145
  static Diagnostic(req: SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GatewayDiagnosticRes> {
146
- 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: "PUT", body: JSON.stringify(req, fm.replacer)})
146
+ 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)})
147
+ }
148
+ static ListGatewayPods(req: SkoalaApiHostedV1alpha1Gateway.ListPodsReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListPodsRes> {
149
+ 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"})
150
+ }
151
+ static GetGatewayPod(req: SkoalaApiHostedV1alpha1Gateway.GetPodReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetPodRes> {
152
+ 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"})
153
+ }
154
+ static GetGatewayPodAlert(req: SkoalaApiHostedV1alpha1Gateway.GatewayPodAlertReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GatewayPodAlertRes> {
155
+ 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"})
156
+ }
157
+ static QueryGatewayDeploymentsMetricRange(req: SkoalaApiHostedV1alpha1Gateway.QueryGatewayDeploymentsMetricRangeReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.QueryGatewayDeploymentsMetricRangeRes> {
158
+ 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"})
159
+ }
160
+ static QueryGatewayPodMetricRange(req: SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRangeReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRangeRes> {
161
+ 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"})
162
+ }
163
+ static QueryGatewayPodMetric(req: SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.QueryGatewayPodMetricRes> {
164
+ 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"})
147
165
  }
148
166
  static CreateVirtualhost(req: SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Virtualhost.CreateVirtualhostRes> {
149
167
  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)})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.4.1-103",
3
+ "version": "0.4.1-109",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {