INNER CODE UNIT · Python

_configured_health_port

ChrispyBacon-dev/DockFlare · dockflare-agent/app/main.py:117

def _configured_health_port():
    try:
        value = int(os.getenv("HEALTH_CHECK_PORT", "8080"))
        return value if 1 <= value <= 65535 else 8080
    except ValueError:
        return 8080


HEALTH_CHECK_PORT = _configured_health_port()


def filter_reportable_labels(labels):
    return {
        key: value for key, value in (labels or {}).items()
        if isinstance(key, str)
        and isinstance(value, str)
        and key.startswith(("dockflare.", "cloudflare.tunnel."))
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…