Open ayrloong opened 2 days ago
I think adding a ServiceName parameter to IDestinationResolver ResolveDestinationsAsync can facilitate third-party service discovery queries
Here https://github.com/dotnet/aspire/blob/main/src/Microsoft.Extensions.ServiceDiscovery.Yarp/ServiceDiscoveryDestinationResolver.cs#L60 If we have a ServiceName parameter, we can use the Microsoft.Extensions.ServiceDiscovery package to implement a service discovery very well.
Also, I think IReadOnlyDictionary<string, DestinationConfig> destinations may not be necessary because we can find DestinationConfig in Microsoft.Extensions.ServiceDiscovery ServiceEndpointResolver
After careful consideration, we can add a method to achieve this. I may have a misunderstanding of the ResolveDestinationsAsync method.
I think adding a ServiceName parameter to IDestinationResolver ResolveDestinationsAsync can facilitate third-party service discovery queries
Here https://github.com/dotnet/aspire/blob/main/src/Microsoft.Extensions.ServiceDiscovery.Yarp/ServiceDiscoveryDestinationResolver.cs#L60 If we have a ServiceName parameter, we can use the Microsoft.Extensions.ServiceDiscovery package to implement a service discovery very well.
Also, I think IReadOnlyDictionary<string, DestinationConfig> destinations may not be necessary because we can find DestinationConfig in Microsoft.Extensions.ServiceDiscovery ServiceEndpointResolver