harp_apps.proxy.settings.remote.endpoint

Inheritance diagram of 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)

success()[source]

Returns a boolean indicating if a state change happened.

Return type:

bool

failure_reasons: set | None
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)]
status: int
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 for proxy.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.

classmethod serialize_in_order(value)[source]
Parameters:

value (List[str])

classmethod validate_pools(pools)[source]
Parameters:

pools (List[str])

Return type:

List[str]

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].

pools: List[str]
url: HttpUrl