pub enum Protocol {
Http,
Tcp,
}Expand description
Protocol used for readiness checks.
The adapter supports two protocols for checking if your web application is ready:
Protocol::Http- Performs an HTTP GET request and checks the response status codeProtocol::Tcp- Attempts a TCP connection to verify the port is listening
§Examples
use lambda_web_adapter::Protocol;
// Parse from string (case-insensitive)
let http: Protocol = "http".into();
let tcp: Protocol = "TCP".into();
assert_eq!(http, Protocol::Http);
assert_eq!(tcp, Protocol::Tcp);Variants§
Http
HTTP protocol - performs GET request and validates response status. This is the default and recommended protocol for most applications.
Tcp
TCP protocol - only checks if a TCP connection can be established. Useful for applications that don’t have an HTTP health endpoint.
Trait Implementations§
impl Copy for Protocol
impl Eq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnsafeUnpin for Protocol
impl UnwindSafe for Protocol
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