pub trait Resolver: Send + Sync {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
kind: SocketKind,
) -> Pin<Box<dyn Future<Output = Result<TransportConfig, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Async endpoint resolver.
Implementations convert a (service_name, socket_kind) pair into a
concrete TransportConfig. The async signature supports both local
(in-memory) and remote (network RPC) resolution.
§Implementors
EndpointRegistry— local, in-process resolution (sync internally)DiscoveryService— authoritative resolution after bootstrapDiscoveryClient— remote resolution via DiscoveryService RPC (future)
Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
kind: SocketKind,
) -> Pin<Box<dyn Future<Output = Result<TransportConfig, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
kind: SocketKind,
) -> Pin<Box<dyn Future<Output = Result<TransportConfig, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Resolve a service endpoint.
Returns the transport configuration for the given service and socket
type. Returns Err if the service is unknown and no default can be
generated.