-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdiagnostics.go
More file actions
36 lines (31 loc) · 1.22 KB
/
Copy pathdiagnostics.go
File metadata and controls
36 lines (31 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Code generated by internal/cmd/gen; DO NOT EDIT.
package flashduty
import "context"
// DiagnosticsService handles the "Monitors/Diagnostics" API resource.
type DiagnosticsService service
// Query structured data.
//
// Run a synchronous ad-hoc query against a configured data source and return a stable `query_result.v1` result whose natural shape is frames, records, or samples. This public API requires monit-edge v0.65.0 or later.
//
// API: POST /monit/query/data (monit-read-query-data).
func (s *DiagnosticsService) QueryData(ctx context.Context, req *QueryDataRequest) (*QueryDataResponse, *Response, error) {
out := new(QueryDataResponse)
resp, err := s.client.do(ctx, "/monit/query/data", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}
// Run Explore query.
//
// Run an Explore query against a configured data source and return frames, samples, or logs.
//
// API: POST /monit/query/explore (monit-read-query-explore).
func (s *DiagnosticsService) QueryExplore(ctx context.Context, req *QueryExploreRequest) (*ExploreData, *Response, error) {
out := new(ExploreData)
resp, err := s.client.do(ctx, "/monit/query/explore", req, out)
if err != nil {
return nil, resp, err
}
return out, resp, nil
}