pub struct HookConfig<K> {
pub name: Arc<str>,
pub endpoint: Endpoint,
pub events: BTreeSet<K>,
pub queue_capacity: usize,
pub maximum_in_flight: usize,
pub maximum_attempts: u32,
pub bearer: Option<BearerToken>,
pub signing_secret: Option<SigningSecret>,
pub client: Option<HttpClient>,
}Expand description
One configured destination.
Fields§
§name: Arc<str>Identifies this hook in metrics and logs, so it must be unique.
endpoint: Endpoint§events: BTreeSet<K>Only these are delivered. Explicit rather than defaulting to everything, so a consumer written today cannot be sent an event type added later.
queue_capacity: usizeCapacity of both bounded stages. Ingress is normally empty; the dispatcher-owned stage is the durable in-memory backlog that applies drop-oldest while an endpoint is unhealthy.
maximum_in_flight: usizeDistinct subjects that may be in flight at once. One request per subject is the ordering rule, so this is also the concurrency.
maximum_attempts: u32Attempts per event, the first included.
bearer: Option<BearerToken>§signing_secret: Option<SigningSecret>Optional Standard Webhooks HMAC-SHA256 signing key.
client: Option<HttpClient>A client of this destination’s own, or None to use the shared one.
Present only when a destination asked for something a shared pool cannot give it: a client certificate, or an authority pinned in place of the platform store. Both belong to this endpoint, and a pooled connection reused across endpoints would present one service’s identity to another — so asking for either costs a pool, and only the endpoints that ask pay for one.
Implementations§
Source§impl<K> HookConfig<K>
impl<K> HookConfig<K>
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Checks transport invariants independently of the application’s parser.