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

Function getReadyRealtimeAPIReplicasOrNil

cli/cluster/delete.go:59–75  ·  view source on GitHub ↗
(operatorConfig OperatorConfig, apiName string)

Source from the content-addressed store, hash-verified

57}
58
59func getReadyRealtimeAPIReplicasOrNil(operatorConfig OperatorConfig, apiName string) *int32 {
60 httpRes, err := HTTPGet(operatorConfig, "/get/"+apiName)
61 if err != nil {
62 return nil
63 }
64
65 var apiRes schema.APIResponse
66 if err = json.Unmarshal(httpRes, &apiRes); err != nil {
67 return nil
68 }
69
70 if apiRes.Status == nil {
71 return nil
72 }
73
74 return pointer.Int32(apiRes.Status.Ready)
75}
76
77func StopJob(operatorConfig OperatorConfig, kind userconfig.Kind, apiName string, jobID string) (schema.DeleteResponse, error) {
78 params := map[string]string{

Callers 1

DeleteFunction · 0.85

Calls 3

UnmarshalFunction · 0.92
Int32Function · 0.92
HTTPGetFunction · 0.85

Tested by

no test coverage detected