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

Function GetDeployedResourceByName

pkg/operator/resources/resources.go:54–65  ·  view source on GitHub ↗

Returns an error if resource doesn't exist

(resourceName string)

Source from the content-addressed store, hash-verified

52
53// Returns an error if resource doesn't exist
54func GetDeployedResourceByName(resourceName string) (*operator.DeployedResource, error) {
55 resource, err := GetDeployedResourceByNameOrNil(resourceName)
56 if err != nil {
57 return nil, err
58 }
59
60 if resource == nil {
61 return nil, ErrorAPINotDeployed(resourceName)
62 }
63
64 return resource, nil
65}
66
67func GetDeployedResourceByNameOrNil(resourceName string) (*operator.DeployedResource, error) {
68 virtualService, err := config.K8s.GetVirtualService(workloads.K8sName(resourceName))

Callers 12

ReadLogsFunction · 0.92
GetLogURLFunction · 0.92
GetTaskJobFunction · 0.92
ReadJobLogsFunction · 0.92
GetJobLogURLFunction · 0.92
SubmitTaskJobFunction · 0.92
SubmitBatchJobFunction · 0.92
GetBatchJobFunction · 0.92
RefreshAPIFunction · 0.85
GetAPIFunction · 0.85
GetAPIByIDFunction · 0.85
DescribeAPIFunction · 0.85

Calls 2

ErrorAPINotDeployedFunction · 0.85

Tested by

no test coverage detected