MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / getWorkerAsTableRow

Function getWorkerAsTableRow

pkg/cmd/worker/view/view.go:101–116  ·  view source on GitHub ↗
(opts *shared.ViewOptions, worker *machines.Worker)

Source from the content-addressed store, hash-verified

99}
100
101func getWorkerAsTableRow(opts *shared.ViewOptions, worker *machines.Worker) []string {
102 workerPoolMap, _ := shared.GetWorkerPoolMap(opts)
103 workerPoolNames := resolveValues(worker.WorkerPoolIDs, workerPoolMap)
104
105 endpointDetails := getEndpointDetails(worker)
106 endpointDetailsStr := formatEndpointDetailsForTable(endpointDetails)
107
108 return []string{
109 worker.Name,
110 getWorkerTypeDisplayName(worker.Endpoint.GetCommunicationStyle()),
111 getHealthStatusFormatted(worker.HealthStatus),
112 worker.StatusSummary,
113 strings.Join(workerPoolNames, ", "),
114 endpointDetailsStr,
115 }
116}
117
118func getWorkerAsBasic(opts *shared.ViewOptions, worker *machines.Worker) string {
119 var result strings.Builder

Callers 1

ViewRunFunction · 0.85

Calls 6

GetWorkerPoolMapFunction · 0.92
getEndpointDetailsFunction · 0.85
getWorkerTypeDisplayNameFunction · 0.85
getHealthStatusFormattedFunction · 0.85
resolveValuesFunction · 0.70

Tested by

no test coverage detected