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

Function DownloadAPISpec

pkg/operator/operator/storage.go:26–33  ·  view source on GitHub ↗
(apiName string, apiID string)

Source from the content-addressed store, hash-verified

24)
25
26func DownloadAPISpec(apiName string, apiID string) (*spec.API, error) {
27 bucketKey := spec.Key(apiName, apiID, config.ClusterConfig.ClusterUID)
28 var api spec.API
29 if err := config.AWS.ReadJSONFromS3(&api, config.ClusterConfig.Bucket, bucketKey); err != nil {
30 return nil, err
31 }
32 return &api, nil
33}
34
35func DownloadAPISpecs(apiNames []string, apiIDs []string) ([]spec.API, error) {
36 apis := make([]spec.API, len(apiNames))

Callers 15

GetAPIByIDFunction · 0.92
GetAPIByNameFunction · 0.92
GetAPIByNameFunction · 0.92
SubmitJobFunction · 0.92
GetAPIByNameFunction · 0.92
SubmitJobFunction · 0.92
getJobFromS3Function · 0.92
getJobFromClusterFunction · 0.92
RefreshAPIFunction · 0.92
GetAPIByNameFunction · 0.92
RefreshAPIFunction · 0.92

Calls 2

KeyFunction · 0.92
ReadJSONFromS3Method · 0.80

Tested by

no test coverage detected