MCPcopy Create free account
hub / github.com/cortexlabs/cortex / APILogURL

Function APILogURL

pkg/operator/operator/workload_logging.go:112–134  ·  view source on GitHub ↗
(api spec.API)

Source from the content-addressed store, hash-verified

110}
111
112func APILogURL(api spec.API) (string, error) {
113 partition := "aws.amazon"
114 region := config.ClusterConfig.Region
115 if awslib.PartitionFromRegion(region) == "aws-us-gov" {
116 partition = "amazonaws-us-gov"
117 }
118 logGroup := config.ClusterConfig.ClusterName
119
120 args := apiLogURLTemplateArgs{
121 Partition: partition,
122 Region: region,
123 LogGroup: logGroup,
124 APIName: api.Name,
125 }
126
127 buf := &bytes.Buffer{}
128 err := _apiLogURLTemplate.Execute(buf, args)
129 if err != nil {
130 return "", err
131 }
132
133 return strings.TrimSpace(buf.String()), nil
134}
135
136func BatchJobLogURL(apiName string, jobStatus status.BatchJobStatus) (string, error) {
137 partition := "aws.amazon"

Callers 1

GetLogURLFunction · 0.92

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected