(sessionID string)
| 234 | } |
| 235 | |
| 236 | func (c *apiClient) observeWsURL(sessionID string) string { |
| 237 | u, err := url.Parse(c.baseURL) |
| 238 | if err != nil { |
| 239 | return "" |
| 240 | } |
| 241 | switch u.Scheme { |
| 242 | case "https": |
| 243 | u.Scheme = "wss" |
| 244 | default: |
| 245 | u.Scheme = "ws" |
| 246 | } |
| 247 | u.Path = "/v0/management/sessions/" + sessionID + "/observe" |
| 248 | return u.String() |
| 249 | } |
| 250 | |
| 251 | func (c *apiClient) cachedSessionIDs() []string { |
| 252 | sessions, err := c.getSessions() |