%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/protocols/haproxy/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/protocols/haproxy/__pycache__/_parser.cpython-312.pyc |
� Ϫ�fi � � � d Z ddlmZmZ ddlmZ ddlmZ ddlm Z m Z mZmZ ddl mZ ddlmZ d eed f deeef defd �Z eee � G d� d� � Zy)z( Parser for 'haproxy:' string endpoint. � )�Mapping�Tuple)�implementer)� interfaces)�!IStreamServerEndpointStringParser�_WrapperServerEndpoint�quoteStringArgument�serverFromString)�IPlugin� )� proxyEndpoint�args.�kwargs�returnc � � dj | D �cg c] }t t |� � �� c}t d� |j � D � � z � }|S c c}w )a Un-parse the already-parsed args and kwargs back into endpoint syntax. @param args: C{:}-separated arguments @param kwargs: C{:} and then C{=}-separated keyword arguments @return: a string equivalent to the original format which this was parsed as. �:c 3 � K � | ]= \ }}d j t t |� � t t |� � � �� �? y�w)z{}={}N)�formatr �str)�.0�key�values �C/usr/lib/python3/dist-packages/twisted/protocols/haproxy/_parser.py� <genexpr>z"unparseEndpoint.<locals>.<genexpr>% s? � �� � � ��U� �N�N�#�C��H�-�/B�3�u�:�/N� � �s �AA)�joinr r �sorted�items)r r �arg�descriptions r �unparseEndpointr sY � � �(�(�26�7�3� �S��X� &�7� � � %�l�l�n� � � ��K� ��� 8s �Ac �@ � e Zd ZdZdZdej dededefd�Z y) �HAProxyServerParserz� Stream server endpoint string parser for the HAProxyServerEndpoint type. @ivar prefix: See L{IStreamServerEndpointStringParser.prefix}. �haproxy�reactorr r r c �H � t ||� }t ||� }t |� S )a[ Parse a stream server endpoint from a reactor and string-only arguments and keyword arguments. @param reactor: The reactor. @param args: The parsed string arguments. @param kwargs: The parsed keyword arguments. @return: a stream server endpoint @rtype: L{IStreamServerEndpoint} )r r r )�selfr$ r r �subdescription�wrappedEndpoints r �parseStreamServerz%HAProxyServerParser.parseStreamServer9 s'