harp_apps.proxy.settings.remote.endpoint¶
- class RemoteEndpoint[source]¶
Bases:
Stateful[RemoteEndpointSettings]
Stateful version of a remote endpoint definition.
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.
- failure(reason=None)[source]¶
Returns a boolean indicating if a state change happened.
- Parameters:
reason (str)
- liveness: IgnoreLiveness | InheritLiveness | LeakyBucketLiveness | NaiveLiveness¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- settings: Annotated[TSettings, Field(repr=False)]¶
- class RemoteEndpointSettings[source]¶
Bases:
Configurable
A
HttpEndpoint
is an instrumented target URL that a proxy will use to route requests. It is used as the configuration parser forproxy.endpoints[].remote.endpoints[]
settings.url: "http://my-endpoint:8080" pools: [fallback] # omit for default pool failure_threshold: 3 success_threshold: 1
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.
- liveness: Annotated[IgnoreLivenessSettings | InheritLivenessSettings | LeakyBucketLivenessSettings | NaiveLivenessSettings, Discriminator(discriminator=type, custom_error_type=None, custom_error_message=None, custom_error_context=None)]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- url: HttpUrl¶