HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/twisted/protocols/haproxy/__pycache__/_parser.cpython-38.pyc
U


W[�@sndZddlmZddlmZddlmZmZmZddl	m
Z
ddlmZdd	�Z
eee�Gd
d�de��ZdS)
z(
Parser for 'haproxy:' string endpoint.
�)�implementer)�IPlugin)�quoteStringArgument�serverFromString�!IStreamServerEndpointStringParser)�	iteritems�)�
proxyEndpointcCs.d�dd�|D�tdd�t|�D���}|S)a�
    Un-parse the already-parsed args and kwargs back into endpoint syntax.

    @param args: C{:}-separated arguments
    @type args: L{tuple} of native L{str}

    @param kwargs: C{:} and then C{=}-separated keyword arguments

    @type arguments: L{tuple} of native L{str}

    @return: a string equivalent to the original format which this was parsed
        as.
    @rtype: native L{str}
    �:cSsg|]}tt|���qS��r�str)�.0�argrr�C/usr/lib/python3/dist-packages/twisted/protocols/haproxy/_parser.py�
<listcomp>%sz#unparseEndpoint.<locals>.<listcomp>cSs,g|]$\}}dtt|��tt|��f�qS)z%s=%sr)r�key�valuerrrr&s�
�)�join�sortedr)�args�kwargsZdescriptionrrr�unparseEndpoints���rc@seZdZdZdZdd�ZdS)�HAProxyServerParserz�
    Stream server endpoint string parser for the HAProxyServerEndpoint type.

    @ivar prefix: See L{IStreamServerEndpointStringParser.prefix}.
    ZhaproxycOst||�}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}
        )rrr	)�selfZreactorrrZsubdescriptionZwrappedEndpointrrr�parseStreamServer7s

z%HAProxyServerParser.parseStreamServerN)�__name__�
__module__�__qualname__�__doc__�prefixrrrrrr.srN)rZzope.interfacerZtwisted.pluginrZtwisted.internet.endpointsrrrZtwisted.python.compatr�r	r�objectrrrrr�<module>s