| 57 | } |
| 58 | |
| 59 | func 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 | |
| 77 | func StopJob(operatorConfig OperatorConfig, kind userconfig.Kind, apiName string, jobID string) (schema.DeleteResponse, error) { |
| 78 | params := map[string]string{ |