@daocloud-proto/insight 0.7.8-6 → 0.8.0-2

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.
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../../fetch.pb"
8
+ import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
8
9
 
9
10
  export enum NodeType {
10
11
  NODE_TYPE_UNSPECIFIED = "NODE_TYPE_UNSPECIFIED",
@@ -90,8 +91,28 @@ export type BaseGraphQuery = {
90
91
  extensionFilters?: string
91
92
  }
92
93
 
94
+ export type BaseMetricsQuery = {
95
+ clusters?: string
96
+ namespaces?: string
97
+ services?: string
98
+ extensionFilters?: string
99
+ endTime?: string
100
+ lookback?: string
101
+ step?: string
102
+ ratePer?: string
103
+ }
104
+
105
+ export type ServiceREDMetricResponse = {
106
+ reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
107
+ errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
108
+ repLatencyMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
109
+ }
110
+
93
111
  export class GraphQueryService {
94
112
  static GetGraph(req: BaseGraphQuery, initReq?: fm.InitReq): Promise<Graph> {
95
113
  return fm.fetchReq<BaseGraphQuery, Graph>(`/apis/insight.io/v1alpha1/service_graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
96
114
  }
115
+ static GetREDMetrics(req: BaseMetricsQuery, initReq?: fm.InitReq): Promise<ServiceREDMetricResponse> {
116
+ return fm.fetchReq<BaseMetricsQuery, ServiceREDMetricResponse>(`/apis/insight.io/v1alpha1/service_graph/service-RED-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
117
+ }
97
118
  }
@@ -47,6 +47,8 @@ export enum AlertStatus {
47
47
  export type ListRulesRequest = {
48
48
  builtin?: boolean
49
49
  name?: string
50
+ clusterName?: string
51
+ namespace?: string
50
52
  severity?: Severity
51
53
  status?: RuleStatus
52
54
  page?: number
@@ -6,6 +6,7 @@
6
6
 
7
7
  import * as InsightIoApiFeature_gateV1alpha1Feature_gate from "../../feature_gate/v1alpha1/feature_gate.pb"
8
8
  import * as fm from "../../fetch.pb"
9
+ import * as InsightIoApiGraphV1alpha1Graph from "../../graph/v1alpha1/graph.pb"
9
10
  import * as InsightIoApiLogV1alpha1Log from "../../log/v1alpha1/log.pb"
10
11
  import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
11
12
  import * as InsightIoApiResourceV1alpha1Cluster from "../../resource/v1alpha1/cluster.pb"
@@ -255,4 +256,9 @@ export class Tracing {
255
256
  static GetOperationDetail(req: InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse> {
256
257
  return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse>(`/apis/insight.io/v1alpha1/traces/operation-detail?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
257
258
  }
259
+ }
260
+ export class GraphQueryService {
261
+ static GetGraph(req: InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.Graph> {
262
+ return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service_graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
263
+ }
258
264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.7.8-6",
3
+ "version":"0.8.0-2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -47,7 +47,7 @@ export type Cluster = {
47
47
  export type ListClusterSummaryRequest = {
48
48
  name?: string
49
49
  version?: string
50
- phases?: ClusterPhase[]
50
+ phase?: ClusterPhase
51
51
  page?: number
52
52
  pageSize?: number
53
53
  }