pub struct RouteEngineTargetResolver { /* private fields */ }Expand description
Adapter that gates a fixed external target through a SharedRoutingService.
Each call to resolve():
- Builds a synthetic
RouteRequestwithtransport = ReverseTcp,listener = reverse_listener_name, andtarget = (host, port). - Calls
router.policy_decision(). If the decision isDirectorUpstreamGroup, returnsTargetResolution::Connect. For reverse traffic, the routing decision is a gate, not a redirect — the reverse client always dials the same external target. - If the decision is
Reject, returnsTargetResolution::Rejectwith the reason.
Implementations§
Source§impl RouteEngineTargetResolver
impl RouteEngineTargetResolver
Sourcepub fn new(
router: Arc<SharedRoutingService>,
host: String,
port: u16,
reverse_listener: Arc<str>,
client_addr: Option<SocketAddr>,
) -> Self
pub fn new( router: Arc<SharedRoutingService>, host: String, port: u16, reverse_listener: Arc<str>, client_addr: Option<SocketAddr>, ) -> Self
Build a new resolver.
Sourcepub fn target(&self) -> &TargetAddr
pub fn target(&self) -> &TargetAddr
Borrow the current target. Used by callers that want to display the configured target without going through the resolver.
Trait Implementations§
Source§impl TargetResolver for RouteEngineTargetResolver
impl TargetResolver for RouteEngineTargetResolver
fn resolve(&self) -> TargetResolution
Auto Trait Implementations§
impl !RefUnwindSafe for RouteEngineTargetResolver
impl !UnwindSafe for RouteEngineTargetResolver
impl Freeze for RouteEngineTargetResolver
impl Send for RouteEngineTargetResolver
impl Sync for RouteEngineTargetResolver
impl Unpin for RouteEngineTargetResolver
impl UnsafeUnpin for RouteEngineTargetResolver
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