/
show_system_status.go
59 lines (45 loc) · 1.58 KB
/
show_system_status.go
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package kinetica
import (
"context"
"go.opentelemetry.io/otel/trace"
)
func NewDefaultShowSystemStatusOptions() *ShowSystemStatusOptions {
return &ShowSystemStatusOptions{}
}
func (kinetica *Kinetica) buildShowSystemStatusOptionsMap(
ctx context.Context, options *ShowSystemStatusOptions) *map[string]string {
var (
// childCtx context.Context
childSpan trace.Span
)
_, childSpan = kinetica.tracer.Start(ctx, "kinetica.buildShowSystemStatusOptionsMap()")
defer childSpan.End()
mapOptions := make(map[string]string)
return &mapOptions
}
func (kinetica *Kinetica) ShowSystemStatusRaw(ctx context.Context) (*ShowSystemStatusResponse, error) {
var (
childCtx context.Context
childSpan trace.Span
)
childCtx, childSpan = kinetica.tracer.Start(ctx, "kinetica.ShowSystemStatusRaw()")
defer childSpan.End()
return kinetica.ShowSystemStatusRawWithOpts(childCtx, NewDefaultShowSystemStatusOptions())
}
func (kinetica *Kinetica) ShowSystemStatusRawWithOpts(
ctx context.Context, options *ShowSystemStatusOptions) (*ShowSystemStatusResponse, error) {
var (
childCtx context.Context
childSpan trace.Span
)
childCtx, childSpan = kinetica.tracer.Start(ctx, "kinetica.ShowSystemStatusRawWithOpts()")
defer childSpan.End()
mapOptions := kinetica.buildShowSystemStatusOptionsMap(childCtx, options)
response := ShowSystemStatusResponse{}
request := ShowSystemStatusRequest{Options: *mapOptions}
err := kinetica.submitRawRequest(
childCtx, "/show/system/status",
&Schemas.showSystemStatusRequest, &Schemas.showSystemStatusResponse,
&request, &response)
return &response, err
}