Skip to content

taps.apps.configs.failures

FailureInjectionConfig

Bases: AppConfig

Failure injection configuration.

get_app()

get_app() -> App

Create an application instance from the config.

Source code in taps/apps/configs/failures.py
def get_app(self) -> App:
    """Create an application instance from the config."""
    from taps.apps.failures.app import FailureInjectionApp

    return FailureInjectionApp(
        base_config=self._get_app_config(),
        failure_rate=self.failure_rate,
        # Because use_enum_values=True, self.failure_type is actually
        # a string and we need to convert it back.
        failure_type=FailureType(self.failure_type),
    )