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

Function DeleteAPI

pkg/operator/resources/job/batchapi/api.go:95–114  ·  view source on GitHub ↗
(apiName string, keepCache bool)

Source from the content-addressed store, hash-verified

93}
94
95func DeleteAPI(apiName string, keepCache bool) error {
96 // best effort deletion, so don't handle error yet
97 err := parallel.RunFirstErr(
98 func() error {
99 return deleteK8sResources(apiName)
100 },
101 func() error {
102 if keepCache {
103 return nil
104 }
105 return deleteS3Resources(apiName)
106 },
107 )
108
109 if err != nil {
110 return err
111 }
112
113 return nil
114}
115
116func deleteS3Resources(apiName string) error {
117 return parallel.RunFirstErr(

Callers 1

DeleteAPIFunction · 0.92

Calls 3

RunFirstErrFunction · 0.92
deleteK8sResourcesFunction · 0.70
deleteS3ResourcesFunction · 0.70

Tested by

no test coverage detected