File: //opt/alt/python37/lib/python3.7/site-packages/elasticsearch/__pycache__/transport.cpython-37.pyc
B
XP�e� � @ s� d dl Z d dlmZmZmZmZ d dlmZmZ e j de
dd� eeef eeeeef f eeeeeef f d�dd �Z
dS )
� N)�Any�Dict�Optional�Union)�AsyncTransport� TransportzjImporting from the 'elasticsearch.transport' module is deprecated. Instead import from 'elastic_transport'� )�category�
stacklevel)� node_info�host�returnc C s* t jdtdd� | �dg �dgkr&dS |S )al
Simple callback that takes the node info from `/_cluster/nodes` and a
parsed connection information and return the connection information. If
`None` is returned this node will be skipped.
Useful for filtering nodes (by proximity for example) or if additional
information needs to be provided for the :class:`~elasticsearch.Connection`
class. By default master only nodes are filtered out since they shouldn't
typically be used for API operations.
:arg node_info: node information from `/_cluster/nodes`
:arg host: connection information (host, port) extracted from the node info
ziThe 'get_host_info' function is deprecated. Instead use the 'sniff_node_callback' parameter on the clientr )r r
ZrolesZmasterN)�warnings�warn�DeprecationWarning�get)r r � r �H/opt/alt/python37/lib/python3.7/site-packages/elasticsearch/transport.py�
get_host_info s r )r �typingr r r r Zelastic_transportr r r r �str�intr r r r r �<module> s