Skip to main content

Module state

Module state 

Source
Expand description

A representation of Sōzu’s state

Structs§

ConfigState
The ConfigState represents the state of Sōzu’s business, which is to forward traffic from frontends to backends. Hence, it contains all details about:

Enums§

StateError

Functions§

merge_custom_http_answers
Merge a CustomHttpAnswers patch into the listener’s stored answers, preserving any field not present in the patch.
validate_alpn_protocols
Validate an AlpnProtocols patch: each value must be “h2” or “http/1.1”. Empty values vec is allowed (reset-to-default).
validate_forwarded_headers
Validate a forwarded_headers wire value: it must name a ForwardedHeaders variant. prost decodes an unknown enum number into the raw i32, and the listener getter would silently read it as the default; a patch carrying one is refused instead.
validate_h2_flood_knobs_http
Validate all H2 flood knobs in an HTTP listener patch.
validate_h2_flood_knobs_http_listener
Validate the H2 knobs of a complete HTTP listener configuration, on the AddHttpListener path (sozu-proxy/sozu#1418).
validate_h2_flood_knobs_https
Validate all H2 flood knobs in an HTTPS listener patch (same rules as HTTP).
validate_h2_flood_knobs_https_listener
Validate the H2 knobs of a complete HTTPS listener configuration, on the AddHttpsListener path (same rules as validate_h2_flood_knobs_http_listener).
validate_hsts_patch
Validate the hsts block of an UpdateHttpsListenerConfig patch: it replaces the listener default whole, and enabled is what tells “disable” from “enable”, so a block without it is refused — on the main process here, on the worker with ListenerError::HstsEnabledRequired.
validate_sozu_id_header
Validate a sozu_id_header value against the RFC 9110 §5.1 token grammar:

Type Aliases§

ClusterId
To use throughout Sōzu