Skip to content

Commit 83e0a26

Browse files
committed
add constants for Route conditions
1 parent 7b79c91 commit 83e0a26

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

gateway-api/src/apis/experimental/constants.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,32 @@ impl std::fmt::Display for ListenerConditionReason {
9191
write!(f, "{:?}", self)
9292
}
9393
}
94+
95+
#[derive(Debug, PartialEq, Eq)]
96+
pub enum RouteConditionType {
97+
Accepted,
98+
ResolvedRefs,
99+
}
100+
impl std::fmt::Display for RouteConditionType {
101+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
102+
write!(f, "{:?}", self)
103+
}
104+
}
105+
106+
#[derive(Debug, PartialEq, Eq)]
107+
pub enum RouteConditionReason {
108+
Accepted,
109+
NotAllowedByListeners,
110+
NoMatchingListenerHostname,
111+
UnsupportedValue,
112+
Pending,
113+
ResolvedRefs,
114+
RefNotPermitted,
115+
InvalidKind,
116+
BackendNotFound,
117+
}
118+
impl std::fmt::Display for RouteConditionReason {
119+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
120+
write!(f, "{:?}", self)
121+
}
122+
}

gateway-api/src/apis/standard/constants.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,36 @@ impl std::fmt::Display for ListenerConditionReason {
8888
write!(f, "{:?}", self)
8989
}
9090
}
91+
92+
#[derive(Debug, PartialEq, Eq)]
93+
pub enum RouteConditionType {
94+
Accepted,
95+
ResolvedRefs,
96+
PartiallyInvalid,
97+
}
98+
impl std::fmt::Display for RouteConditionType {
99+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
100+
write!(f, "{:?}", self)
101+
}
102+
}
103+
104+
#[derive(Debug, PartialEq, Eq)]
105+
pub enum RouteConditionReason {
106+
Accepted,
107+
NotAllowedByListeners,
108+
NoMatchingListenerHostname,
109+
NoMatchingParent,
110+
UnsupportedValue,
111+
Pending,
112+
IncompatibleFilters,
113+
ResolvedRefs,
114+
RefNotPermitted,
115+
InvalidKind,
116+
BackendNotFound,
117+
UnsupportedProtocol,
118+
}
119+
impl std::fmt::Display for RouteConditionReason {
120+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
121+
write!(f, "{:?}", self)
122+
}
123+
}

0 commit comments

Comments
 (0)