MCPcopy
hub / github.com/cortexlabs/cortex / Info

Function Info

cli/cluster/info.go:25–38  ·  view source on GitHub ↗
(operatorConfig OperatorConfig)

Source from the content-addressed store, hash-verified

23)
24
25func Info(operatorConfig OperatorConfig) (*schema.InfoResponse, error) {
26 httpResponse, err := HTTPGet(operatorConfig, "/info")
27 if err != nil {
28 return nil, errors.Wrap(err, "unable to connect to operator", "/info")
29 }
30
31 var infoResponse schema.InfoResponse
32 err = json.Unmarshal(httpResponse, &infoResponse)
33 if err != nil {
34 return nil, errors.Wrap(err, "/info", string(httpResponse))
35 }
36
37 return &infoResponse, nil
38}

Callers 2

getInfoOperatorResponseFunction · 0.92
version.goFile · 0.92

Calls 3

WrapFunction · 0.92
UnmarshalFunction · 0.92
HTTPGetFunction · 0.85

Tested by

no test coverage detected