GetAddresses returns the addresses of all instances within the replication set. Returned slice order is not guaranteed.
()
| 121 | // GetAddresses returns the addresses of all instances within the replication set. Returned slice |
| 122 | // order is not guaranteed. |
| 123 | func (r ReplicationSet) GetAddresses() []string { |
| 124 | addrs := make([]string, 0, len(r.Instances)) |
| 125 | for _, desc := range r.Instances { |
| 126 | addrs = append(addrs, desc.Addr) |
| 127 | } |
| 128 | return addrs |
| 129 | } |
| 130 | |
| 131 | // GetAddressesWithout returns the addresses of all instances within the replication set while |
| 132 | // excluding the specified address. Returned slice order is not guaranteed. |
no outgoing calls