caller must lock
(implicitOnly bool)
| 6210 | |
| 6211 | // caller must lock |
| 6212 | func (nc *Conn) getServers(implicitOnly bool) []string { |
| 6213 | poolSize := len(nc.srvPool) |
| 6214 | servers := make([]string, 0) |
| 6215 | for i := 0; i < poolSize; i++ { |
| 6216 | if implicitOnly && !nc.srvPool[i].isImplicit { |
| 6217 | continue |
| 6218 | } |
| 6219 | url := nc.srvPool[i].URL |
| 6220 | servers = append(servers, fmt.Sprintf("%s://%s", url.Scheme, url.Host)) |
| 6221 | } |
| 6222 | return servers |
| 6223 | } |
| 6224 | |
| 6225 | // Servers returns the list of known server urls, including additional |
| 6226 | // servers discovered after a connection has been established. If |
no outgoing calls
no test coverage detected