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

Function realtimeAPITable

cli/cmd/lib_realtime_apis.go:32–55  ·  view source on GitHub ↗
(realtimeAPI schema.APIResponse, env cliconfig.Environment)

Source from the content-addressed store, hash-verified

30)
31
32func realtimeAPITable(realtimeAPI schema.APIResponse, env cliconfig.Environment) (string, error) {
33 var out string
34
35 t := realtimeAPIsTable([]schema.APIResponse{realtimeAPI}, []string{env.Name})
36 out += t.MustFormat()
37
38 if realtimeAPI.DashboardURL != nil && *realtimeAPI.DashboardURL != "" {
39 out += "\n" + console.Bold("metrics dashboard: ") + *realtimeAPI.DashboardURL + "\n"
40 }
41
42 if realtimeAPI.Endpoint != nil {
43 out += "\n" + console.Bold("endpoint: ") + *realtimeAPI.Endpoint + "\n"
44 }
45
46 out += "\n" + apiHistoryTable(realtimeAPI.APIVersions)
47
48 if !_flagVerbose {
49 return out, nil
50 }
51
52 out += titleStr("configuration") + strings.TrimSpace(realtimeAPI.Spec.UserStr())
53
54 return out, nil
55}
56
57func realtimeDescribeAPITable(realtimeAPI schema.APIResponse, env cliconfig.Environment) (string, error) {
58 if realtimeAPI.Metadata == nil {

Callers 1

getAPIFunction · 0.85

Calls 6

BoldFunction · 0.92
realtimeAPIsTableFunction · 0.85
apiHistoryTableFunction · 0.85
titleStrFunction · 0.85
MustFormatMethod · 0.80
UserStrMethod · 0.45

Tested by

no test coverage detected