Returns an error if resource doesn't exist
(resourceName string)
| 52 | |
| 53 | // Returns an error if resource doesn't exist |
| 54 | func 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 | |
| 67 | func GetDeployedResourceByNameOrNil(resourceName string) (*operator.DeployedResource, error) { |
| 68 | virtualService, err := config.K8s.GetVirtualService(workloads.K8sName(resourceName)) |
no test coverage detected