Add French docstrings and README
- Docstrings for all modules, classes and methods - README.md with installation and usage instructions - Update CLAUDE.md with dns.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
"""
|
||||
Checker HTTP.
|
||||
|
||||
Vérifie la disponibilité d'un service web via requête HTTP.
|
||||
"""
|
||||
|
||||
import time
|
||||
|
||||
import requests
|
||||
@@ -6,7 +12,26 @@ from .base import BaseChecker, CheckResult
|
||||
|
||||
|
||||
class HttpChecker(BaseChecker):
|
||||
"""
|
||||
Vérifie la disponibilité d'un service web.
|
||||
|
||||
Configuration YAML:
|
||||
url: URL à vérifier (obligatoire).
|
||||
method: Méthode HTTP (défaut: GET).
|
||||
expected_status: Code HTTP attendu (défaut: 200).
|
||||
timeout: Délai d'attente en secondes (défaut: 10).
|
||||
verify_ssl: Vérifier le certificat SSL (défaut: true).
|
||||
headers: En-têtes HTTP additionnels (optionnel).
|
||||
"""
|
||||
|
||||
def check(self) -> CheckResult:
|
||||
"""
|
||||
Exécute une requête HTTP vers l'URL configurée.
|
||||
|
||||
Returns:
|
||||
CheckResult avec success=True si le code HTTP correspond
|
||||
à expected_status.
|
||||
"""
|
||||
url = self.config["url"]
|
||||
method = self.config.get("method", "GET").upper()
|
||||
timeout = self.config.get("timeout", 10)
|
||||
|
||||
Reference in New Issue
Block a user