entity.infrastructure.base module

class entity.infrastructure.base.BaseInfrastructure(version=None)[source]

Bases: ABC

Common functionality for infrastructure components.

Parameters:

version (str | None)

__init__(version=None)[source]
Parameters:

version (str | None)

Return type:

None

version = '0.1'
async startup()[source]

Perform asynchronous initialization.

Return type:

None

async shutdown()[source]

Perform asynchronous cleanup.

Return type:

None

abstractmethod async health_check()[source]

Return True if the infrastructure is healthy.

Return type:

bool

health_check_sync()[source]

Synchronous wrapper for health_check for compatibility.

Return type:

bool