(worker *machines.Worker)
| 169 | } |
| 170 | |
| 171 | func 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 | |
| 194 | func formatEndpointDetailsForTable(details map[string]string) string { |
| 195 | var parts []string |
no outgoing calls
no test coverage detected