Module

health.linkcheck.orchestrator

Link check orchestrator - coordinates internal and external checking.

Classes

LinkCheckOrchestrator
Orchestrates link checking across internal and external links. Features: - Extracts links from all…
6

Orchestrates link checking across internal and external links.

Features:

  • Extracts links from all pages
  • Separates internal vs external
  • Checks both concurrently
  • Applies ignore policies
  • Returns consolidated results

Methods 3

check_all_links
Check all links in the site.
0 tuple[list[LinkChec…
def check_all_links(self) -> tuple[list[LinkCheckResult], LinkCheckSummary]

Check all links in the site.

Returns

tuple[list[LinkCheckResult], LinkCheckSummary]

Tuple of (results list, summary)

format_json_report
Format results as JSON report.
2 dict[str, Any]
def format_json_report(self, results: list[LinkCheckResult], summary: LinkCheckSummary) -> dict[str, Any]

Format results as JSON report.

Parameters 2
results list[LinkCheckResult]

List of check results

summary LinkCheckSummary

Summary statistics

Returns

dict[str, Any]

JSON-serializable dict

format_console_report
Format results as console report.
2 str
def format_console_report(self, results: list[LinkCheckResult], summary: LinkCheckSummary) -> str

Format results as console report.

Parameters 2
results list[LinkCheckResult]

List of check results

summary LinkCheckSummary

Summary statistics

Returns

str

Formatted string for console output

Internal Methods 3
__init__
Initialize link check orchestrator.
4 None
def __init__(self, site: Site, check_internal: bool = True, check_external: bool = True, config: dict[str, Any] | None = None)

Initialize link check orchestrator.

Parameters 4
site Site

Site instance

check_internal bool

Whether to check internal links

check_external bool

Whether to check external links

config dict[str, Any] | None

Configuration dict for checkers

_extract_links
Extract all links from built HTML files, separated by internal vs external.
0 tuple[list[tuple[st…
def _extract_links(self) -> tuple[list[tuple[str, str]], list[tuple[str, str]]]

Extract all links from built HTML files, separated by internal vs external.

Returns

tuple[list[tuple[str, str]], list[tuple[str, str]]]

Tuple of (internal_links, external_links) where each is a list of (url, page_path) tuples

_build_summary
Build summary from results.
2 LinkCheckSummary
def _build_summary(self, results: list[LinkCheckResult], duration_ms: float) -> LinkCheckSummary

Build summary from results.

Parameters 2
results list[LinkCheckResult]

List of check results

duration_ms float

Total duration in milliseconds

Returns

LinkCheckSummary

LinkCheckSummary