Get returns connection info for an api_id.
(apiID string)
| 143 | |
| 144 | // Get returns connection info for an api_id. |
| 145 | func (r *Registry) Get(apiID string) ConnectionInfo { |
| 146 | r.mu.RLock() |
| 147 | defer r.mu.RUnlock() |
| 148 | if info, ok := r.meta[apiID]; ok && info.Connected { |
| 149 | return info |
| 150 | } |
| 151 | return ConnectionInfo{Connected: false, Secure: false} |
| 152 | } |
| 153 | |
| 154 | // GetConnectedApiIDs returns all api_ids that are currently connected. |
| 155 | func (r *Registry) GetConnectedApiIDs() []string { |
no outgoing calls