Skip to content

http

Structs

Enums


firma_sidecar::connector::provider::http::GenericHttpConnector

Section titled “firma_sidecar::connector::provider::http::GenericHttpConnector”

Struct

HTTP connector built on [reqwest::Client].

One instance per configured host plus one registry default. Connection pooling and HTTP/2 multiplexing are inherited from the underlying client; the Arc<Client> is cheap to clone into the registry.

Methods:

  • fn new(config: &HttpConnectorConfig) -> Result<Self, HttpConnectorBuildError> - Builds a connector with the given [HttpConnectorConfig].
  • fn default_for_unconfigured() -> Result<Self, HttpConnectorBuildError> - Builds the registry default connector: 30s timeout, no rate

Trait Implementations:

  • Connector
    • fn dispatch(self: &'life0 Self, view: &'life1 TransportView) -> ::core::pin::Pin<Box<dyn ::core::future::Future>>

firma_sidecar::connector::provider::http::HttpConnectorBuildError

Section titled “firma_sidecar::connector::provider::http::HttpConnectorBuildError”

Enum

Errors raised while constructing a [GenericHttpConnector].

Kept separate from [ConnectorError] because these failures are startup-time configuration bugs, not hot-path dispatch outcomes.

Variants:

  • Client(String) - The underlying [reqwest::Client] could not be constructed.

firma_sidecar::connector::provider::http::HttpConnectorConfig

Section titled “firma_sidecar::connector::provider::http::HttpConnectorConfig”

Struct

Build-time configuration for a [GenericHttpConnector] instance.

Built from the sidecar HostConnectorConfig at startup. Per-host instances carry a rate limiter; the registry default built via [GenericHttpConnector::default_for_unconfigured] does not.

Fields:

  • timeout: std::time::Duration - Dispatch timeout for both the rate-limiter wait and the
  • rate_limit: Option<RateLimitConfig> - Optional token-bucket rate limiter parameters.

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Clone
    • fn clone(self: &Self) -> HttpConnectorConfig

firma_sidecar::connector::provider::http::RateLimitConfig

Section titled “firma_sidecar::connector::provider::http::RateLimitConfig”

Struct

Token-bucket rate-limit parameters.

rps is the sustained refill rate (tokens per second); burst is the bucket capacity (maximum instantaneous burst).

Fields:

  • rps: std::num::NonZeroU32 - Tokens produced per second.
  • burst: std::num::NonZeroU32 - Bucket capacity.

Traits: Copy

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • Clone
    • fn clone(self: &Self) -> RateLimitConfig