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

Function DeleteAPI

pkg/operator/resources/realtimeapi/api.go:157–177  ·  view source on GitHub ↗
(apiName string, keepCache bool)

Source from the content-addressed store, hash-verified

155}
156
157func DeleteAPI(apiName string, keepCache bool) error {
158 err := parallel.RunFirstErr(
159 func() error {
160 return deleteK8sResources(apiName)
161 },
162 func() error {
163 if keepCache {
164 return nil
165 }
166 // best effort deletion, swallow errors because there could be weird error messages
167 _ = deleteBucketResources(apiName)
168 return nil
169 },
170 )
171
172 if err != nil {
173 return err
174 }
175
176 return nil
177}
178
179func GetAllAPIs(deployments []kapps.Deployment) ([]schema.APIResponse, error) {
180 realtimeAPIs := make([]schema.APIResponse, len(deployments))

Callers 1

DeleteAPIFunction · 0.92

Calls 3

RunFirstErrFunction · 0.92
deleteK8sResourcesFunction · 0.70
deleteBucketResourcesFunction · 0.70

Tested by

no test coverage detected