
    i9                         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	  edg          Z
 ej        e          Ze
                    d	          d
efd            ZdS )u  
Nom du script : health.py
Chemin : /gitlab-bridge/app/api/v1/health.py
Description : Endpoint de santé applicative du bridge GitLab.
              Vérifie la connectivité à GitLab et retourne la version.
Options éventuelles : Aucune.
Exemples d'utilisation : GET /health.
Prérequis : Python 3.11+, FastAPI.
Auteur : Sylvain SCATTOLINI
Date de création / modification : 2026-04-09
Version : 1.2
    N)	APIRouter)JSONResponse)GitLabClient)GitLabApiErrorhealth)tagsz/healthreturnc            	      F   t                      } 	 |                                 }|                    dd          }t          ddd|d          S # t          $ rG}t
                              d|           t          d	d
dt          |          d          cY d}~S d}~ww xY w)u   
    Vérifie que le bridge est opérationnel et que GitLab est joignable.
    Retourne HTTP 200 si tout est OK, HTTP 503 si GitLab est inaccessible.
    versionunknown   ok	reachable)statusgitlabgitlab_version)status_codecontentu)   Health check : GitLab inaccessible — %si  degradedunreachable)r   r   detailN)r   check_versiongetr   r   loggerwarningstr)clientversion_infor   excs       0/var/www/html/gitlab-bridge/app/api/v1/health.pyr   r      s     ^^F
++--%)))Y??%"0 
 
 
 	
  	
 	
 	
BCHHH$'c(( 
 
 
 	
 	
 	
 	
 	
 	
	
s   >A 
B <BB B )__doc__loggingfastapir   fastapi.responsesr   app.clients.gitlab_clientr   app.core.exceptionsr   router	getLogger__name__r   r   r        r    <module>r,      s            * * * * * * 2 2 2 2 2 2 . . . . . .	
	#	#	#		8	$	$ I
 
 
 
 
 
 
r+   