harp_apps.proxy.settings.endpoint

Inheritance diagram of harp_apps.proxy.settings.endpoint

class BaseEndpointSettings[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.

description: str | None

description, informative only

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str

endpoint name, used as an unique identifier

port: int | None

port to listen on

class Endpoint[source]

Bases: Stateful[EndpointSettings]

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

remote: Remote
settings: Annotated[TSettings, Field(repr=False)]
class EndpointSettings[source]

Bases: BaseEndpointSettings

Configuration parser for proxy.endpoints[] settings.

name: my-endpoint
port: 8080
description: My endpoint
remote:
  # see HttpRemote
  ...
controller : optional controller Service definition, default to HttpProxyController

A shorthand syntax is also available for cases where you only need to proxy to a single URL and do not require fine-tuning the endpoint settings:

name: my-endpoint
port: 8080
description: My endpoint
url: http://my-endpoint:8080

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.

controller: Service | str | None

custom controller

description: str | None

description, informative only

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str

endpoint name, used as an unique identifier

port: int | None

port to listen on

remote: RemoteSettings | None

remote definition, with url pools, probes, etc.