pub enum DrainRequestMethods {
PostOnly,
GetOrPost,
}Expand description
HTTP methods that the /drainz probe route accepts.
A drain request starts the process shutdown, so the default accepts only
POST. Kubernetes preStop.httpGet hooks can send only GET; a deployment
that drains through such a hook opts in with Self::GetOrPost.
Variants§
Implementations§
Source§impl DrainRequestMethods
impl DrainRequestMethods
Sourcepub fn parse(raw: &str) -> Option<Self>
pub fn parse(raw: &str) -> Option<Self>
Parses the value of ROCKETMQ_HEALTH_DRAIN_METHODS.
Accepts a comma-separated method list, ignoring case, blanks around
methods, and order: POST or GET,POST. Returns None for any other
list, including GET alone, since draining must stay reachable by POST.
Sourcepub const fn allow_header(self) -> &'static str
pub const fn allow_header(self) -> &'static str
Returns the value of the Allow header for a rejected drain request.
Trait Implementations§
Source§impl Clone for DrainRequestMethods
impl Clone for DrainRequestMethods
impl Copy for DrainRequestMethods
Source§impl Debug for DrainRequestMethods
impl Debug for DrainRequestMethods
Source§impl Default for DrainRequestMethods
impl Default for DrainRequestMethods
impl Eq for DrainRequestMethods
Source§impl PartialEq for DrainRequestMethods
impl PartialEq for DrainRequestMethods
impl StructuralPartialEq for DrainRequestMethods
Auto Trait Implementations§
impl Freeze for DrainRequestMethods
impl RefUnwindSafe for DrainRequestMethods
impl Send for DrainRequestMethods
impl Sync for DrainRequestMethods
impl Unpin for DrainRequestMethods
impl UnsafeUnpin for DrainRequestMethods
impl UnwindSafe for DrainRequestMethods
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more