@daocloud-proto/kairship 0.2.2-40 → 0.2.2-44
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.
|
@@ -21,4 +21,21 @@ export type Sample = {
|
|
|
21
21
|
export type samplePair = {
|
|
22
22
|
timestamp?: string
|
|
23
23
|
value?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type PrometheusQueryRangeRequest = {
|
|
27
|
+
instance?: string
|
|
28
|
+
query?: string
|
|
29
|
+
start?: string
|
|
30
|
+
end?: string
|
|
31
|
+
step?: number
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type PrometheusQueryRangeResult = {
|
|
35
|
+
matrix?: SampleStream[]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type SampleStream = {
|
|
39
|
+
metric?: {[key: string]: string}
|
|
40
|
+
values?: samplePair[]
|
|
24
41
|
}
|
|
@@ -283,6 +283,9 @@ export class Insight {
|
|
|
283
283
|
static QueryMetric(req: KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryResult> {
|
|
284
284
|
return fm.fetchReq<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRequest, KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryResult>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/metric?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
285
285
|
}
|
|
286
|
+
static QueryRangeMetric(req: KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeRequest, initReq?: fm.InitReq): Promise<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeResult> {
|
|
287
|
+
return fm.fetchReq<KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeRequest, KairshipIoApiInsightV1alpha1Prometheus.PrometheusQueryRangeResult>(`/apis/kairship.io/v1alpha1/instances/${req["instance"]}/range-metric?${fm.renderURLSearchParams(req, ["instance"])}`, {...initReq, method: "GET"})
|
|
288
|
+
}
|
|
286
289
|
}
|
|
287
290
|
export class aggregation {
|
|
288
291
|
static CreateAggregationResource(req: KairshipIoApiAggregationV1alpha1Aggregation.CreateAggregationResourceRequest, initReq?: fm.InitReq): Promise<KairshipIoApiAggregationV1alpha1Aggregation.AggregationResource> {
|