§
    ŠtjÙ  ã                   ó2   — d Z ddlZd„ Z G d„ d¦  «        ZdS )z8Thread-safe in-memory store for the Kubernetes informer.é    Nc                 óà  — t          | t          ¦  «        rF|                      d¦  «        pi }|                     d¦  «        pd}|                     d¦  «        pd}nzt          | dd¦  «        }|€dS t	          |d¦  «        r't          |dd¦  «        pd}t          |dd¦  «        pd}n.|                     d¦  «        pd}|                     d¦  «        pd}|rd                     ||¦  «        S |S )z¸Build a lookup key from object metadata.

    Supports both dict-based objects and generated model objects.
    Returns namespace/name for namespaced objects, just name otherwise.
    ÚmetadataÚ	namespaceÚ ÚnameNz{}/{})Ú
isinstanceÚdictÚgetÚgetattrÚhasattrÚformat)ÚobjÚmetaÚnsr   s       úW/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/kubernetes/informer/cache.pyÚ_meta_namespace_keyr      s  € õ �#•tÑÔð *Ø�wŠw�zÑ"Ô"Ð( bˆØ�XŠX�kÑ"Ô"Ð( bˆØ�xŠx˜ÑÔÐ% 2ˆˆå�s˜J¨Ñ-Ô-ˆØˆ<Ø�2Ý�4˜Ñ%Ô%ð 	*Ý˜˜{¨DÑ1Ô1Ð7°RˆBÝ˜4 ¨Ñ.Ô.Ð4°"ˆDˆDà—’˜+Ñ&Ô&Ð,¨"ˆBØ—8’8˜FÑ#Ô#Ð) rˆDØ	ð (Ø�~Š~˜b $Ñ'Ô'Ð'Ø€Kó    c                   óD   — e Zd ZdZdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ ZdS )ÚObjectCachezËThread-safe in-memory mapping of Kubernetes objects.

    The SharedInformer keeps this store synchronised with the API server.
    Consumers can call list() and get_by_key() from any thread safely.
    Nc                 ód   — |�|nt           | _        i | _        t          j        ¦   «         | _        d S ©N)r   Ú	_key_funcÚ_objectsÚ	threadingÚRLockÚ_rlock)ÚselfÚkey_funcs     r   Ú__init__zObjectCache.__init__4   s-   € Ø%-Ð%9˜˜Õ?RˆŒØˆŒÝ”oÑ'Ô'ˆŒˆˆr   c                 ó„   — |                       |¦  «        }| j        5  || j        |<   d d d ¦  «         d S # 1 swxY w Y   d S r   )r   r   r   ©r   r   Úkeys      r   Ú_putzObjectCache._put;   s‹   € Ø�nŠn˜SÑ!Ô!ˆØŒ[ð 	%ð 	%Ø!$ˆDŒM˜#Ñð	%ð 	%ð 	%ñ 	%ô 	%ð 	%ð 	%ð 	%ð 	%ð 	%ð 	%ð 	%øøøð 	%ð 	%ð 	%ð 	%ð 	%ð 	%s   �5µ9¼9c                 ó¦   — |                       |¦  «        }| j        5  | j                             |d ¦  «         d d d ¦  «         d S # 1 swxY w Y   d S r   )r   r   r   Úpopr!   s      r   Ú_removezObjectCache._remove@   s—   € Ø�nŠn˜SÑ!Ô!ˆØŒ[ð 	)ð 	)ØŒM×Ò˜c 4Ñ(Ô(Ð(ð	)ð 	)ð 	)ñ 	)ô 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)øøøð 	)ð 	)ð 	)ð 	)ð 	)ð 	)s   �AÁA
ÁA
c                 ór   ‡ — ˆ fd„|D ¦   «         }‰ j         5  |‰ _        d d d ¦  «         d S # 1 swxY w Y   d S )Nc                 ó<   •— i | ]}‰                      |¦  «        |“ŒS © )r   )Ú.0Úor   s     €r   ú
<dictcomp>z,ObjectCache._replace_all.<locals>.<dictcomp>F   s'   ø€ Ð9Ð9Ð9¨A�4—>’> !Ñ$Ô$ aÐ9Ð9Ð9r   )r   r   )r   ÚobjectsÚrebuilts   `  r   Ú_replace_allzObjectCache._replace_allE   s�   ø€ Ø9Ð9Ð9Ð9°Ð9Ñ9Ô9ˆØŒ[ð 	$ð 	$Ø#ˆDŒMð	$ð 	$ð 	$ñ 	$ô 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$øøøð 	$ð 	$ð 	$ð 	$ð 	$ð 	$s   —,¬0³0c                 ó�   — | j         5  t          | j                             ¦   «         ¦  «        cddd¦  «         S # 1 swxY w Y   dS )z-Return a snapshot list of all cached objects.N)r   Úlistr   Úvalues©r   s    r   r1   zObjectCache.listL   s‡   € àŒ[ð 	0ð 	0Ý˜œ×,Ò,Ñ.Ô.Ñ/Ô/ð	0ð 	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	0ð 	0ó   ˆ&;»?Á?c                 ó�   — | j         5  t          | j                             ¦   «         ¦  «        cddd¦  «         S # 1 swxY w Y   dS )z)Return a snapshot list of all cache keys.N)r   r1   r   Úkeysr3   s    r   Ú	list_keyszObjectCache.list_keysQ   s‡   € àŒ[ð 	.ð 	.Ý˜œ×*Ò*Ñ,Ô,Ñ-Ô-ð	.ð 	.ð 	.ð 	.ñ 	.ô 	.ð 	.ð 	.ð 	.ð 	.ð 	.ð 	.øøøð 	.ð 	.ð 	.ð 	.ð 	.ð 	.r4   c                 óV   — |                       |¦  «        }|                      |¦  «        S )z9Look up the cached copy of obj. Returns None when absent.)r   Ú
get_by_keyr!   s      r   r
   zObjectCache.getV   s%   € à�nŠn˜SÑ!Ô!ˆØ�Š˜sÑ#Ô#Ð#r   c                 óx   — | j         5  | j                             |¦  «        cddd¦  «         S # 1 swxY w Y   dS )z3Look up an object by key. Returns None when absent.N)r   r   r
   )r   r"   s     r   r9   zObjectCache.get_by_key[   s�   € àŒ[ð 	*ð 	*Ø”=×$Ò$ SÑ)Ô)ð	*ð 	*ð 	*ð 	*ñ 	*ô 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*øøøð 	*ð 	*ð 	*ð 	*ð 	*ð 	*s   ˆ/¯3¶3r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r&   r/   r1   r7   r
   r9   r)   r   r   r   r   -   s›   € € € € € ðð ð(ð (ð (ð (ð%ð %ð %ð
)ð )ð )ð
$ð $ð $ð0ð 0ð 0ð
.ð .ð .ð
$ð $ð $ð
*ð *ð *ð *ð *r   r   )r>   r   r   r   r)   r   r   ú<module>r?      sZ   ðð ?Ð >à Ð Ð Ð ðð ð ð21*ð 1*ð 1*ð 1*ð 1*ñ 1*ô 1*ð 1*ð 1*ð 1*r   