pub trait ServiceResolver: Send + Sync {
// Required method
fn cluster_ip<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Resolves a clientConfig.service ref to the Service’s allocated
ClusterIP. Production reads the store (the ClusterIP allocator stamps
spec.clusterIP); tests pass a static map. The seam keeps the plugin
unit-testable with ZERO store: a Service ref resolves to a VIP through
a mock.
Required Methods§
Sourcefn cluster_ip<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cluster_ip<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The allocated ClusterIP (spec.clusterIP) for the Service
namespace/name, or None when it has no VIP (absent, headless,
or not-yet-allocated).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".