pub enum DiscoverySource {
Static(Vec<String>),
EnvPrefix(String),
File(String),
Dns {
hostname: String,
port: u16,
},
}Expand description
Controls how BackendPool discovers backend addresses.
Variants§
Static(Vec<String>)
Fixed list of "host:port" addresses — never refreshed.
EnvPrefix(String)
Scan environment variables PREFIX_0, PREFIX_1, … until one is absent.
File(String)
Read one host:port per line from a file. Blank lines and lines starting
with # are ignored.
Dns
Resolve hostname via A-record DNS lookup; format each IP as ip:port.
Auto Trait Implementations§
impl Freeze for DiscoverySource
impl RefUnwindSafe for DiscoverySource
impl Send for DiscoverySource
impl Sync for DiscoverySource
impl Unpin for DiscoverySource
impl UnsafeUnpin for DiscoverySource
impl UnwindSafe for DiscoverySource
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