
    Vhi                         d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
mZmZ ddlmZ ddlmZ d	eed
f   deeef   defdZ eee	       G d d             Zy)z(
Parser for 'haproxy:' string endpoint.
    )MappingTuple)implementer)
interfaces)!IStreamServerEndpointStringParser_WrapperServerEndpointquoteStringArgumentserverFromString)IPlugin   )proxyEndpointargs.kwargsreturnc           
          dj                  | D cg 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      Q/home/dcms/DCMS/lib/python3.12/site-packages/twisted/protocols/haproxy/_parser.py	<genexpr>z"unparseEndpoint.<locals>.<genexpr>%   s?      
 U NN#CH-/B3u:/N
s   AA)joinr	   r   sorteditems)r   r   argdescriptions       r   unparseEndpointr       sY     ((2673	SX	&7
 
 %lln	
 
	
K  	8s   Ac                   @    e Zd ZdZdZdej                  dededefd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'      )v6*7NC_--    N)
__name__
__module____qualname____doc__prefixr   IReactorCoreobjectr   r)    r*   r   r"   r"   /   s9     F.!...7=.IO.	.r*   r"   N)r.   typingr   r   zope.interfacer   twisted.internetr   twisted.internet.endpointsr   r   r	   r
   twisted.pluginr    r   r1   r   r    r"   r2   r*   r   <module>r9      st   
 " & '  # %, gc6k6J s 0 W78. . 9.r*   