Ë
    ómxiy  ã            
       óÂ   — d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ  G d„ dej                   ej                  dg d	¢«      «      Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)z-Utilities for RPC Framework's Face interface.é    N)Úcardinality)Ústyle)Ústream)Úfacec                   ó   — e Zd Zy)Ú_MethodImplementationN)Ú__name__Ú
__module__Ú__qualname__© ó    ú_/home/htdocs/ttos/venv/lib/python3.12/site-packages/grpc/framework/interfaces/face/utilities.pyr   r      s   „ ð$ 	r   r   )
r   r   Úunary_unary_inlineÚunary_stream_inlineÚstream_unary_inlineÚstream_stream_inlineÚunary_unary_eventÚunary_stream_eventÚstream_unary_eventÚstream_stream_eventc                 óŠ   — t        t        j                  j                  t        j
                  j                  | ddddddd«
      S )a]  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-unary RPC method as a callable value
        that takes a request value and an face.ServicerContext object and
        returns a response value.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   ÚCardinalityÚUNARY_UNARYr   ÚServiceÚINLINE©Úbehaviors    r   r   r   .   sE   € ô !Ü×Ñ×+Ñ+Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  d| dddddd«
      S )al  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-stream RPC method as a callable
        value that takes a request value and an face.ServicerContext object and
        returns an iterator of response values.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   ÚUNARY_STREAMr   r   r   r   s    r   r   r   G   sE   € ô !Ü×Ñ×,Ñ,Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  dd| ddddd«
      S )al  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-unary RPC method as a callable
        value that takes an iterator of request values and an
        face.ServicerContext object and returns a response value.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   ÚSTREAM_UNARYr   r   r   r   s    r   r   r   `   sE   € ô !Ü×Ñ×,Ñ,Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  ddd| dddd«
      S )a{  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-stream RPC method as a callable
        value that takes an iterator of request values and an
        face.ServicerContext object and returns an iterator of response values.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   ÚSTREAM_STREAMr   r   r   r   s    r   r   r   y   sE   € ô !Ü×Ñ×-Ñ-Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  dddd| ddd«
      S )a~  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-unary RPC method as a callable
        value that takes a request value, a response callback to which to pass
        the response value of the RPC, and an face.ServicerContext.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r   r   r   ÚEVENTr   s    r   r   r   ’   sE   € ô !Ü×Ñ×+Ñ+Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  ddddd| dd«
      S )a~  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-stream RPC method as a callable
        value that takes a request value, a stream.Consumer to which to pass the
        response values of the RPC, and an face.ServicerContext.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r   r   r   r%   r   s    r   r   r   «   sE   € ô !Ü×Ñ×,Ñ,Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  dddddd| d«
      S )aË  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-unary RPC method as a callable
        value that takes a response callback to which to pass the response value
        of the RPC and an face.ServicerContext and returns a stream.Consumer to
        which the request values of the RPC should be passed.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r!   r   r   r%   r   s    r   r   r   Ä   sE   € ô !Ü×Ñ×,Ñ,Ü�‰×ÑØØØØØØØØóð r   c                 óŠ   — t        t        j                  j                  t        j
                  j                  ddddddd| «
      S )aË  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-stream RPC method as a callable
        value that takes a stream.Consumer to which to pass the response values
        of the RPC and an face.ServicerContext and returns a stream.Consumer to
        which the request values of the RPC should be passed.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r#   r   r   r%   r   s    r   r   r   Þ   sE   € ô !Ü×Ñ×-Ñ-Ü�‰×ÑØØØØØØØØóð r   )Ú__doc__ÚcollectionsÚgrpc.framework.commonr   r   Úgrpc.framework.foundationr   Úgrpc.framework.interfaces.facer   ÚMethodImplementationÚ
namedtupler   r   r   r   r   r   r   r   r   r   r   r   ú<module>r0      sn   ðñ 4ã õ .Ý 'Ý ,Ý /ô	Ø×ÑØ€K×ÑØò	
óô	ò*ò2ò2ò2ò2ò2ò2ó4r   