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

Function APIEndpoint

pkg/operator/operator/k8s.go:55–66  ·  view source on GitHub ↗
(api *spec.API)

Source from the content-addressed store, hash-verified

53}
54
55func APIEndpoint(api *spec.API) (string, error) {
56 var err error
57 baseAPIEndpoint := ""
58
59 baseAPIEndpoint, err = APILoadBalancerURL()
60 if err != nil {
61 return "", err
62 }
63 baseAPIEndpoint = strings.Replace(baseAPIEndpoint, "https://", "http://", 1)
64
65 return urls.Join(baseAPIEndpoint, *api.Networking.Endpoint), nil
66}
67
68func APIEndpointFromResource(deployedResource *DeployedResource) (string, error) {
69 apiEndpoint, err := userconfig.EndpointFromAnnotation(deployedResource.VirtualService)

Callers 8

UpdateAPIFunction · 0.92
GetAPIByNameFunction · 0.92
GetAPIByNameFunction · 0.92
GetAPIByNameFunction · 0.92
getJobEndpointFunction · 0.92
GetAPIByNameFunction · 0.92
GetAPIByNameFunction · 0.92
GetTaskJobFunction · 0.92

Calls 2

JoinFunction · 0.92
APILoadBalancerURLFunction · 0.85

Tested by

no test coverage detected