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

Function Refresh

cli/cluster/refresh.go:26–43  ·  view source on GitHub ↗
(operatorConfig OperatorConfig, apiName string, force bool)

Source from the content-addressed store, hash-verified

24)
25
26func Refresh(operatorConfig OperatorConfig, apiName string, force bool) (schema.RefreshResponse, error) {
27 params := map[string]string{
28 "force": s.Bool(force),
29 }
30
31 httpRes, err := HTTPPostNoBody(operatorConfig, "/refresh/"+apiName, params)
32 if err != nil {
33 return schema.RefreshResponse{}, err
34 }
35
36 var refreshRes schema.RefreshResponse
37 err = json.Unmarshal(httpRes, &refreshRes)
38 if err != nil {
39 return schema.RefreshResponse{}, errors.Wrap(err, "/refresh", string(httpRes))
40 }
41
42 return refreshRes, nil
43}

Callers 1

refresh.goFile · 0.92

Calls 3

UnmarshalFunction · 0.92
WrapFunction · 0.92
HTTPPostNoBodyFunction · 0.85

Tested by

no test coverage detected