harp_apps.proxy.settings.liveness.base

Inheritance diagram of 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:
failure(subject, reason=None)[source]
Parameters:
Return type:

bool

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:

bool

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:

bool

success(subject)[source]
Parameters:

subject (LivenessSubject)

Return type:

bool

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.

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.

type: Literal['ignore', 'inherit', 'naive', 'leaky']
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:
failure(subject, reason=None)[source]
Parameters:
Return type:

bool

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:

bool

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:

bool

success(subject)[source]
Parameters:

subject (LivenessSubject)

Return type:

bool

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:
failure(subject, reason=None)[source]
Parameters:
Return type:

bool

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:

bool

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:

bool

success(subject)[source]
Parameters:

subject (LivenessSubject)

Return type:

bool

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:
failure(subject, reason=None)[source]
Parameters:
Return type:

bool

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:

bool

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:

bool

success(subject)[source]
Parameters:

subject (LivenessSubject)

Return type:

bool

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:
failure(subject, reason=None)[source]
Parameters:
Return type:

bool

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:

bool

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:

bool

success(subject)[source]
Parameters:

subject (LivenessSubject)

Return type:

bool

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 LivenessSubject[source]

Bases: Protocol

__init__(*args, **kwargs)
failure_reasons: set | None
status: int