-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event for when Eureka registry is updated #765
Conversation
/azp run Steeltoe.All |
Azure Pipelines successfully started running 1 pipeline(s). |
Given the location of the change it's not immediately clear to me how somebody would take advantage of this change, can you provide an example of what you expect that'd look like? |
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov Report
@@ Coverage Diff @@
## main #765 +/- ##
==========================================
+ Coverage 74.22% 74.24% +0.02%
==========================================
Files 1306 1306
Lines 45540 45540
Branches 8953 8953
==========================================
+ Hits 33802 33812 +10
+ Misses 9235 9225 -10
Partials 2503 2503
Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed! |
Something like this public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IDiscoveryClient client)
{
var eureka = (DiscoveryClient) client;
eureka.OnApplicationsChange += (sender, applications) =>
{
Console.WriteLine("====");
foreach (var application in applications.GetRegisteredApplications())
{
Console.WriteLine($"App: {application.Name}");
foreach (var instance in application.Instances)
{
Console.WriteLine($" {instance.Actiontype} {instance.HostName}:{instance.Port}");
}
}
}; |
This implementation should be OK for now, but we'll probably want to revisit with this issue to align with Spring and things like Do you have time to add a unit test for this @macsux? |
Azure Pipelines successfully started running 1 pipeline(s). |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Adds support for #761