
    i                        d dl mZ d dlZd dlZd dlZd dlmZ ddlmZ ddl	m
Z
 ej         G d d                      Zej         G d	 d
                      Z G d dej                  ZdS )    )annotationsN)
server_lib   )connect_pb2)ValueWatcherc                  $    e Zd ZU ded<   ded<   dS )	AppConfigzlist[server_lib.FunctionConfig]	functionsz
str | NoneversionN)__name__
__module____qualname____annotations__     ]/root/projects/qq-shell/venv/lib/python3.11/site-packages/inngest/connect/_internal/models.pyr	   r	      s*         ....r   r	   c                  ~    e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ded<   ded<   ded<   ddZddZdS )Statez#
    Shared state for Connect.
    zValueWatcher[str | None]conn_idz5ValueWatcher[tuple[connect_pb2.AuthData, str] | None]	conn_initzValueWatcher[ConnectionState]
conn_statezValueWatcher[list[str]]exclude_gatewayszValueWatcher[int | None]extend_lease_intervalzValueWatcher[Exception | None]fatal_errorzValueWatcher[bool]init_handshake_completezValueWatcher[int]pending_request_countz0ValueWatcher[websockets.ClientConnection | None]wsreturnboolc                J    | j         j        t          j        t          j        fvS )N)r   valueConnectionStateCLOSEDCLOSINGselfs    r   allow_reconnectzState.allow_reconnect+   s%    $"#-
 
 	
r   Nonec                    |                                  rt          j        | j        _        d| j        _        d| j        _        dS )z0
        Close the WebSocket connection
        N)r'   r"   RECONNECTINGr   r!   r   r   r%   s    r   close_wszState.close_ws1   s=    
 !! 	A$3$@DO!#r   N)r   r   )r   r(   )r   r   r   __doc__r   r'   r+   r   r   r   r   r      s           &%%%DDDD--------3333 0/////// -,,,8888
 
 
 
     r   r   c                  *    e Zd ZdZdZdZdZdZdZdZ	dS )	r"   z8
    State of the connection to the Inngest server.
    ACTIVEr#   r$   
CONNECTINGPAUSEDr*   N)
r   r   r   r,   r.   r#   r$   r/   r0   r*   r   r   r   r"   r"   <   s8          FFGJF!LLLr   r"   )
__future__r   dataclassesenum
websocketsinngest._internalr    r   value_watcherr   	dataclassr	   r   Enumr"   r   r   r   <module>r:      s   " " " " " "          ( ( ( ( ( (       ' ' ' ' ' '        
 $ $ $ $ $ $ $ $N
" 
" 
" 
" 
"di 
" 
" 
" 
" 
"r   