harp_apps.proxy.settings.liveness.leaky_bucket¶
- class LeakyBucketLiveness[source]¶
Bases:
BaseLiveness[LeakyBucketLivenessSettings]
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.
- classmethod get_state_of(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- failure(subject, reason=None)[source]¶
- Parameters:
subject (LivenessSubject)
reason (str | None)
- Return type:
- success(subject)[source]¶
- Parameters:
subject (LivenessSubject)
- Return type:
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class LeakyBucketLivenessSettings[source]¶
Bases:
BaseLivenessSettings
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_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class LeakyBucketLivenessSubjectState[source]¶
Bases:
BaseModel
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_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].