MCPcopy Index your code
hub / github.com/cortexlabs/cortex / GetAPI

Function GetAPI

cli/cluster/get.go:40–52  ·  view source on GitHub ↗
(operatorConfig OperatorConfig, apiName string)

Source from the content-addressed store, hash-verified

38}
39
40func GetAPI(operatorConfig OperatorConfig, apiName string) ([]schema.APIResponse, error) {
41 httpRes, err := HTTPGet(operatorConfig, "/get/"+apiName)
42 if err != nil {
43 return nil, err
44 }
45
46 var apiRes []schema.APIResponse
47 if err = json.Unmarshal(httpRes, &apiRes); err != nil {
48 return nil, errors.Wrap(err, "/get/"+apiName, string(httpRes))
49 }
50
51 return apiRes, nil
52}
53
54func DescribeAPI(operatorConfig OperatorConfig, apiName string) ([]schema.APIResponse, error) {
55 httpRes, err := HTTPGet(operatorConfig, "/describe/"+apiName)

Callers 5

delete.goFile · 0.92
trafficSplitTableFunction · 0.92
get.goFile · 0.92
getAPIFunction · 0.92
cluster.goFile · 0.92

Calls 3

UnmarshalFunction · 0.92
WrapFunction · 0.92
HTTPGetFunction · 0.85

Tested by

no test coverage detected