pub enum StateError {
Show 17 variants
EmptyRequest,
NoChange,
UndispatchableRequest,
NotFound {
kind: ObjectKind,
id: String,
},
Exists {
kind: ObjectKind,
id: String,
},
ClusterNotFound {
kind: ObjectKind,
cluster_id: String,
},
WrongFieldValue(UnknownEnumValue),
AddCertificate(CertificateError),
RemoveCertificate(String),
ReplaceCertificate(String),
FrontendConversion {
frontend: String,
error: String,
},
FileError(Error),
InvalidValue {
field: &'static str,
reason: &'static str,
},
InvalidTcpFrontend {
address: SocketAddr,
reason: String,
},
UdpFrontendAddressTaken {
address: SocketAddr,
cluster_id: ClusterId,
current_cluster_id: ClusterId,
current_tags: BTreeMap<String, String>,
},
ListenerInterface(InterfaceError),
AmbiguousListenerAddress {
address: SocketAddr,
count: usize,
},
}Variants§
EmptyRequest
NoChange
UndispatchableRequest
NotFound
Exists
ClusterNotFound
The object belongs to a cluster the state does not hold, never added
or already removed. A backend belongs to its cluster
(ConfigState::add_backend), so it is refused rather than stored
without one. Per doc/observability.md a cluster identifier is
protected material in error text: Display/Debug render only its
length, and the raw field stays lossless for callers.
WrongFieldValue(UnknownEnumValue)
AddCertificate(CertificateError)
RemoveCertificate(String)
ReplaceCertificate(String)
FrontendConversion
FileError(Error)
InvalidValue
InvalidTcpFrontend
Mirrors the worker’s ProxyError::InvalidTcpFrontend
(lib/src/tcp.rs): the master rejects an AddTcpFrontend for the
same reasons validate_new_tcp_front would, so a route never lands
in ConfigState only to be NACKed by every worker on the next
fan-out (sozu-proxy/sozu#1290).
UdpFrontendAddressTaken
A UDP listener address is the WHOLE routing key. A datagram carries no
SNI, no Host header and no path, so no attribute of an incoming
datagram could pick between two frontends bound to one address –
which is why this is not an unimplemented feature but an unanswerable
question, and why TCP legitimately hosts several frontends per address
while UDP cannot. The worker agrees by construction:
UdpProxy::add_udp_front (lib/src/udp.rs) overwrites
listener.cluster_id and the listener’s tags, and
cluster_for_listener maps one listener token to exactly one cluster.
current_cluster_id and current_tags name the frontend already
holding address, so a caller matching this variant can tell the
operator which frontend to remove first. Per doc/observability.md’s
sensitive-value logging boundary a cluster identifier and a frontend’s
tags are protected material in error text, so the Display/Debug
projection renders only the address and bounded metadata; the raw
fields stay lossless for callers, exactly as that boundary specifies.
ListenerInterface(InterfaceError)
The interface of an added listener is not a valid interface name, or
the platform cannot bind a socket to an interface.
AmbiguousListenerAddress
An Update*Listener patch names its listener by address only, and
several listeners share that address on different interfaces.
Trait Implementations§
Source§impl Debug for StateError
impl Debug for StateError
Source§impl Display for StateError
impl Display for StateError
Source§impl Error for StateError
impl Error for StateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()