harp_apps.proxy.settings.liveness.base¶
- class BaseLiveness[source]¶
Bases:
Stateful[TypeVar]
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- add_failure_reason(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- failure(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- Return type:
- reset_failure_reasons(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- set_status_as_down_if_necessary(subject)[source]¶
Change the status to DOWN if it is not already DOWN, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- set_status_as_up_if_necessary(subject)[source]¶
Change the status to UP if it is not already UP, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- success(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class BaseLivenessSettings[source]¶
Bases:
Configurable
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['ignore', 'inherit', 'naive', 'leaky'], required=False, default='inherit')}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class BaseLiveness[source]¶
Bases:
Stateful[TypeVar]
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- add_failure_reason(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- failure(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- Return type:
- reset_failure_reasons(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- set_status_as_down_if_necessary(subject)[source]¶
Change the status to DOWN if it is not already DOWN, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- set_status_as_up_if_necessary(subject)[source]¶
Change the status to UP if it is not already UP, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- success(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- settings: Annotated[TSettings, Field(repr=False)]¶
- class BaseLiveness[source]¶
Bases:
Stateful[TypeVar]
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- add_failure_reason(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- failure(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- Return type:
- reset_failure_reasons(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- set_status_as_down_if_necessary(subject)[source]¶
Change the status to DOWN if it is not already DOWN, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- set_status_as_up_if_necessary(subject)[source]¶
Change the status to UP if it is not already UP, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- success(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- settings: Annotated[TSettings, Field(repr=False)]¶
- class BaseLiveness[source]¶
Bases:
Stateful[TypeVar]
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- add_failure_reason(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- failure(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- Return type:
- reset_failure_reasons(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- set_status_as_down_if_necessary(subject)[source]¶
Change the status to DOWN if it is not already DOWN, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- set_status_as_up_if_necessary(subject)[source]¶
Change the status to UP if it is not already UP, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- success(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- settings: Annotated[TSettings, Field(repr=False)]¶
- class BaseLiveness[source]¶
Bases:
Stateful[TypeVar]
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- add_failure_reason(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- failure(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- Return type:
- reset_failure_reasons(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- set_status_as_down_if_necessary(subject)[source]¶
Change the status to DOWN if it is not already DOWN, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- set_status_as_up_if_necessary(subject)[source]¶
Change the status to UP if it is not already UP, returns whether the state changed.
- Parameters:
subject (LivenessSubject)
- Return type:
- success(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- settings: Annotated[TSettings, Field(repr=False)]¶