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

Function getEndpointDetails

pkg/cmd/worker/view/view.go:171–192  ·  view source on GitHub ↗
(worker *machines.Worker)

Source from the content-addressed store, hash-verified

169}
170
171func getEndpointDetails(worker *machines.Worker) map[string]string {
172 details := make(map[string]string)
173
174 switch endpoint := worker.Endpoint.(type) {
175 case *machines.ListeningTentacleEndpoint:
176 details["URI"] = endpoint.URI.String()
177 if endpoint.TentacleVersionDetails != nil {
178 details["Tentacle version"] = endpoint.TentacleVersionDetails.Version
179 }
180 case *machines.PollingTentacleEndpoint:
181 if endpoint.TentacleVersionDetails != nil {
182 details["Tentacle version"] = endpoint.TentacleVersionDetails.Version
183 }
184 case *machines.SSHEndpoint:
185 details["URI"] = endpoint.URI.String()
186 if endpoint.DotNetCorePlatform != "" {
187 details["Platform"] = endpoint.DotNetCorePlatform
188 }
189 }
190
191 return details
192}
193
194func formatEndpointDetailsForTable(details map[string]string) string {
195 var parts []string

Callers 3

getWorkerAsJsonFunction · 0.85
getWorkerAsTableRowFunction · 0.85
getWorkerAsBasicFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected