Find a host in the metadata for a specific endpoint. If a string inet address and port are passed, iterate all hosts to match the :attr:`~.pool.Host.broadcast_rpc_address` and :attr:`~.pool.Host.broadcast_rpc_port`attributes.
(self, endpoint_or_address, port=None)
| 339 | return bool(self._hosts.pop(host.endpoint, False)) |
| 340 | |
| 341 | def get_host(self, endpoint_or_address, port=None): |
| 342 | """ |
| 343 | Find a host in the metadata for a specific endpoint. If a string inet address and port are passed, |
| 344 | iterate all hosts to match the :attr:`~.pool.Host.broadcast_rpc_address` and |
| 345 | :attr:`~.pool.Host.broadcast_rpc_port`attributes. |
| 346 | """ |
| 347 | if not isinstance(endpoint_or_address, EndPoint): |
| 348 | return self._get_host_by_address(endpoint_or_address, port) |
| 349 | |
| 350 | return self._hosts.get(endpoint_or_address) |
| 351 | |
| 352 | def _get_host_by_address(self, address, port=None): |
| 353 | for host in self._hosts.values(): |
no test coverage detected