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

Function RefreshAPI

pkg/operator/resources/resources.go:169–183  ·  view source on GitHub ↗
(apiName string, force bool)

Source from the content-addressed store, hash-verified

167}
168
169func RefreshAPI(apiName string, force bool) (string, error) {
170 deployedResource, err := GetDeployedResourceByName(apiName)
171 if err != nil {
172 return "", err
173 }
174
175 switch deployedResource.Kind {
176 case userconfig.RealtimeAPIKind:
177 return realtimeapi.RefreshAPI(apiName, force)
178 case userconfig.AsyncAPIKind:
179 return asyncapi.RefreshAPI(apiName, force)
180 default:
181 return "", ErrorOperationIsOnlySupportedForKind(*deployedResource, userconfig.RealtimeAPIKind, userconfig.AsyncAPIKind)
182 }
183}
184
185func DeleteAPI(apiName string, keepCache bool) (*schema.DeleteResponse, error) {
186 deployedResource, err := GetDeployedResourceByNameOrNil(apiName)

Callers 1

RefreshFunction · 0.92

Calls 4

RefreshAPIFunction · 0.92
RefreshAPIFunction · 0.92

Tested by

no test coverage detected