U
    ‰dC  ã                   @   st   d Z ddlmZ ddlmZ dd„ Zddddd	d
d
dddddddddddddddddœZi Zddd„Zddd„Z	dS ) zBuilt-in transports.é    )Ú_detect_environment)Úsymbol_by_namec                  C   s4   t ƒ dkr0zddl} W n tk
r*   Y nX dS dS )z/Return true if :pypi:`librabbitmq` can be used.Údefaultr   NT)r   ÚlibrabbitmqÚImportError)r   © r   ú</tmp/pip-unpacked-wheel-hqfrjlvz/kombu/transport/__init__.pyÚsupports_librabbitmq   s    
r	   z kombu.transport.pyamqp:Transportz#kombu.transport.pyamqp:SSLTransportz%kombu.transport.librabbitmq:Transportz kombu.transport.memory:Transportzkombu.transport.redis:Transportzkombu.transport.SQS:Transportz!kombu.transport.mongodb:Transportz#kombu.transport.zookeeper:Transportz$kombu.transport.sqlalchemy:Transportzkombu.transport.SLMQ.Transportz$kombu.transport.filesystem:Transportzkombu.transport.qpid:Transportz'kombu.transport.redis:SentinelTransportz kombu.transport.consul:Transportzkombu.transport.etcd:Transportz,kombu.transport.azurestoragequeues:Transportz)kombu.transport.azureservicebus:Transportzkombu.transport.pyro:Transport)ZamqpZamqpsZpyamqpr   ZmemoryZredisZredissZSQSZsqsZmongodbZ	zookeeperZ
sqlalchemyZsqlaZSLMQZslmqÚ
filesystemZqpidÚsentinelZconsulZetcdZazurestoragequeuesZazureservicebusZpyroNc                 C   sŽ   t | tƒrŠzt|  } W n\ tk
rr   d| krnd| krnddlm} || tƒ}|r`td | |¡ƒ‚td| › ƒ‚Y nX t| ƒr‚| ƒ } t| ƒS | S )zæGet transport by name.

    Arguments:
        transport (Union[str, type]): This can be either
            an actual transport class, or the fully qualified
            path to a transport class, or the alias of a transport.
    Ú.ú:r   )Úfmatch_bestz(No such transport: {}.  Did you mean {}?zNo such transport: )	Ú
isinstanceÚstrÚTRANSPORT_ALIASESÚKeyErrorZkombu.utils.textr   ÚformatÚcallabler   )Ú	transportr   Zaltr   r   r   Úresolve_transport/   s&    

 ÿÿr   c                 C   s   | t krt| ƒt | < t |  S )zþGet transport class by name.

    The transport string is the full path to a transport class, e.g.::

        "kombu.transport.pyamqp:Transport"

    If the name does not include `"."` (is not fully qualified),
    the alias table will be consulted.
    )Ú_transport_cacher   )r   r   r   r   Úget_transport_clsJ   s    
r   )N)N)
Ú__doc__Zkombu.utils.compatr   Zkombu.utils.importsr   r	   r   r   r   r   r   r   r   r   Ú<module>   s<   é
